public void ChangeGameState(IGameState newGameState) { if (newGameState == _gameState) return; CommonFunction.DebugMsg(string.Format("遊戲狀態改變 從 {0} -> {1}", _gameState, newGameState)); _gameState = null; _gameState = newGameState; _gameState.OnChangeIn(); }