예제 #1
0
 public void ChangeGameState(Systems.GameState.State newState)
 {
     if (OnGameStateChanged != null)
     {
         OnGameStateChanged(newState);
     }
 }
예제 #2
0
        private void SetHudElementsState(Systems.GameState.State currentState)
        {
            switch (currentState)
            {
            case Systems.GameState.State.PLAY:
                m_PauseButton.gameObject.SetActive(true);
                m_AddCoinsButton.gameObject.SetActive(false);
                m_TurnsIndicator.transform.parent.gameObject.SetActive(true);
                m_PointsIndicator.gameObject.SetActive(true);
                break;

            case Systems.GameState.State.GAME_OVER:
            case Systems.GameState.State.PAUSE:
            case Systems.GameState.State.REWARDING:
                m_PauseButton.gameObject.SetActive(false);
                m_AddCoinsButton.gameObject.SetActive(true);
                m_TurnsIndicator.transform.parent.gameObject.SetActive(false);
                m_PointsIndicator.gameObject.SetActive(false);
                break;
            }
        }
예제 #3
0
        private void SetWindowsState(Systems.GameState.State currentState)
        {
            switch (currentState)
            {
            case Systems.GameState.State.PLAY:

                break;

            case Systems.GameState.State.GAME_OVER:
                m_GameOverWindow.SetActive(true);
                Systems.GameState.Instance.UpdateBestScore();
                break;

            case Systems.GameState.State.PAUSE:
                Systems.GameState.Instance.UpdateBestScore();
                m_PauseWindow.SetActive(true);
                break;

            case Systems.GameState.State.REWARDING:
                m_ClaimPrizeWindow.SetActive(true);
                break;
            }
        }
예제 #4
0
 void OnGameStateChanged(Systems.GameState.State newState)
 {
     SetHudElementsState(newState);
     SetWindowsState(newState);
 }