コード例 #1
0
        public void UpdateGame()
        {
            switch (m_gameState)
            {
            case GameState.None:
            case GameState.AppandingToMasterClient:
            {
                break;
            }

            case GameState.Initing:
            {
                if (m_gameStartCondition.IsGameCanStart())
                {
                    StartGame();
                }
                break;
            }

            case GameState.Running:
            {
                m_runningGameLogic.Tick();
                if (m_gameOverCondition.IsGameOver(OnPlayerWin, OnPlayerLose))
                {
                    m_gameOverCondition = null;
                    m_gameState         = GameState.End;
                }
                break;
            }
            }
        }