Ejemplo n.º 1
0
        public void RenderState()
        {
            GameRunning.GetInstance().RenderState();

            foreach (var button in menuButtons)
            {
                button.RenderText();
            }
        }
Ejemplo n.º 2
0
        public void SwitchState(GameStateType stateType)
        {
            switch (stateType)
            {
            case GameStateType.GameRunning:
                ActiveState = GameRunning.GetInstance();
                break;

            case GameStateType.GamePaused:
                ActiveState = GamePaused.GetInstance();
                break;

            case GameStateType.MainMenu:
                ActiveState = MainMenu.GetInstance();
                break;

            case GameStateType.ChooseLevel:
                ActiveState = ChooseLevel.GetInstance();
                break;
            }
        }