Example #1
0
 private void VerifyGoToGameplay()
 {
     if (Input.GetKeyDown(KeyCode.Space))
     {
         if (gameState.Equals(Enums.GameState.MainMenu))
         {
             ChangeGameStateTo(Enums.GameState.Gameplay);
         }
     }
 }
Example #2
0
    private void OnSetGameState(Enums.GameState state)
    {
        gameState = state;

        if (state.Equals(Enums.GameState.Gameplay))
        {
            ResetCurrentScores();
        }

        SetScore(score);
    }
Example #3
0
 private void SetScore(Score _score)
 {
     if (gameState.Equals(Enums.GameState.MainMenu))
     {
         scoreManagerView.SetCurrentHighScore(_score);
     }
     else
     {
         scoreManagerView.SetCurrentScore(_score);
     }
 }
Example #4
0
 private void OnSetGameState(Enums.GameState state)
 {
     if (state.Equals(Enums.GameState.Gameplay))
     {
         uiManagerView.HideMainMenuUI();
         uiManagerView.ShowGameplayUI();
     }
     else
     {
         uiManagerView.ShowMainMenuUI();
         uiManagerView.HideGameplayUI();
     }
 }
Example #5
0
 private void OnSetGameState(Enums.GameState state)
 {
     if (state.Equals(Enums.GameState.Gameplay))
     {
         bulletsGenerationCoroutine = StartCoroutine(GenerateBullets());
     }
     else
     {
         if (bulletsGenerationCoroutine != null)
         {
             StopCoroutine(bulletsGenerationCoroutine);
         }
     }
 }