private void Awake() { PlatformCreate(); PlayerCreate(); EffectManager.GetInstance().SetPlayers(_player.gameObject, _enemy.gameObject); _dataContainer = DataContainer.GetInstance(); #region TEST _dataContainer.SetPlayerId("NADA"); var testPacket = new PacketInfo.MatchSuccessNotify() { _gameNumber = 0, _enemyId = "ASDF", _enemyWins = 0, _enemyLoses = 0, _enemyType = 2 }; _dataContainer.SetGameMatchData(testPacket); #endregion UIInitialize(); _playerText.GetComponent <Text>().text = "PLAYER 1"; _enemyText.GetComponent <Text>().text = "PLAYER 2"; StartCoroutine("OnTurnChanged", false); }
// 매치 성공 알림 답변 패킷 처리. private void OnMatchSuccessNotify(PacketInfo.MatchSuccessNotify receivedPacket) { // 받은 정보를 저장한다. _dataContainer.SetGameMatchData(receivedPacket); // 게임 씬으로 상태를 바꾼다. SceneManager.LoadScene("4. Game"); }
public void SetGameMatchData(PacketInfo.MatchSuccessNotify matchPacket) { _gameNumber = matchPacket._gameNumber; _enemyId = matchPacket._enemyId; _enemyWins = matchPacket._enemyWins; _enemyLoses = matchPacket._enemyLoses; _enemyType = (CharacterType)matchPacket._enemyType; }