Exemplo n.º 1
0
        private IEnumerator GameOverSequence(GameController controller, GameOverData gameOverData)
        {
            if (controller != null)
            {
                controller.HideMenus();
                controller.BlockPlayerActions();
            }

            sequence.SetGameOverData(gameOverData);
            sequence.StartSequence();

            yield return(null);

            inputEnabled = true;

            yield return(new WaitUntil(() => sequence.completed));
        }
Exemplo n.º 2
0
 public void SetGameOverData(GameOverData gameOverData)
 {
     if (gameOverData.defeatedPlayer == 1)
     {
         victoryPlayerText.text = gameOverData.player1.name;
         defeatPlayerText.text  = gameOverData.player2.name;
         elementsToInvert.ToList().ForEach(t =>
         {
             t.localScale = new Vector3(1, 1, 1);
         });
     }
     else
     {
         // TODO: invert all containers!!
         victoryPlayerText.text = gameOverData.player2.name;
         defeatPlayerText.text  = gameOverData.player1.name;
         elementsToInvert.ToList().ForEach(t =>
         {
             t.localScale = new Vector3(-1, 1, 1);
         });
     }
 }
Exemplo n.º 3
0
 public void StartSequence(GameController controller, GameOverData gameOverData)
 {
     StartCoroutine(GameOverSequence(controller, gameOverData));
 }