예제 #1
0
    private void WinGame()
    {
        m_gameComplete = true;

        foreach (PlayerController player in m_allPlayers)
        {
            player.enabled = false;
        }

        m_gameCompleteEvent.Invoke();
        if (m_winAnim != null)
        {
            m_winAnim.ShowWinAnimation(m_winningPlayer.transform, m_winningPlayer.m_winningCameraPos);
        }
    }
예제 #2
0
        private void PublishGameComplete()
        {
            LogInfo("Game has ended, the winnig player is " +
                    (Winner == null ? "no one, game ended in a draw" : Winner.Name));
            LogInfo("Leader Board");
            for (int i = 0; i < LeaderBoard.Count; i++)
            {
                LogInfo(i + ": " + LeaderBoard[i]);
            }

            foreach (var player in _players)
            {
                player.GameEnded(_gameMap);
            }

            _gameComplete = true;
            GameComplete?.Invoke(_gameMap, LeaderBoard);
        }
예제 #3
0
 private void InternalGameComplete(object sender, GameCompleteEventArgs e)
 {
     GameComplete?.Invoke(this, e);
 }
예제 #4
0
 private void RaiseGameComplete()
 {
     GameComplete?.Invoke(this, new GameCompleteEventArgs {
         ElapsedTime = CurrentPresenter.ElapsedTime
     });
 }