메인 화면 UI 구조 변경
This commit is contained in:
@@ -9,6 +9,8 @@ namespace TON
|
||||
// 사용자가 생성해둔 플레이어 데이터를 싱글톤으로 전역 사용하기 위함
|
||||
public List<PlayerData> playersData { get; private set; }
|
||||
|
||||
public PlayerData player { get; private set; }
|
||||
|
||||
protected override void Awake()
|
||||
{
|
||||
base.Awake();
|
||||
@@ -24,5 +26,18 @@ namespace TON
|
||||
}
|
||||
}
|
||||
|
||||
public void SetCurrentUserData()
|
||||
{
|
||||
int characterId = PlayerPrefs.GetInt("SelectedPlayerIndex", -1);
|
||||
if (characterId > -1)
|
||||
{
|
||||
player = playersData[characterId];
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.LogError("유효하지 않은 캐릭터 정보 입니다.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user