Exemplo n.º 1
0
        public void PlayCurrentState()
        {
            gameState = replayManager.GetGameStateForRound(currentRound);
            uiManager.UpdateUI(gameState.GameDetails, gameState.Players[0], gameState.Players[1]);
            instantiator.ClearScene();

            //InstantiateNextRoundNewMissiles();

            PopulateSceneFromGameMap();

            // Process Tesla hits one round ahead
            if (CanIncrementRound())
            {
                var nextRound     = currentRound + 1;
                var nextGameState = replayManager.GetGameStateForRound(nextRound);
                if (nextGameState.TeslaHitList.Count > 0)
                {
                    ProcessTeslaHitList(nextGameState.TeslaHitList);
                }
            }

            if (currentRound > 0)
            {
                ProcessIronCurtainHitList(gameState.Players);
            }

            if (CanIncrementRound())
            {
                currentRound++;
            }
            else
            {
                gameManager.ReplayFinished();
            }
        }
 public void PlayCurrentState()
 {
     LoadJsonMapForPlayerA("/" + ConvertRoundToFolderName(currentRound));
     uiManager.UpdateUI(gameState.GameDetails, gameState.Players [0], gameState.Players [1]);
     instantiator.ClearScene();
     PopulateSceneFromGameMap();
     if (CanIncrementRound())
     {
         currentRound++;
     }
     else if (IsGameFinished())
     {
         gameManager.ReplayFinished();
     }
 }