Beispiel #1
0
    private IEnumerator _EndPhase()
    {
        FinalScore.ShowWinningTeam();

        yield return(new WaitForSeconds(1));

        if (isServer)
        {
            GalaxyAudioPlayer.PlayEndAmbiance();
            if (Team.humanTeam.score > Team.robotTeam.score)
            {
                Team.humanTeam.IncreaseVictoryCount();
            }
            else if (Team.robotTeam.score > Team.humanTeam.score)
            {
                Team.robotTeam.IncreaseVictoryCount();
            }
            Team.humanTeam.ResetScore();
            Team.robotTeam.ResetScore();
        }

        yield return(new WaitForSeconds(2));

        FinalScore.ShowSummaryTable();
    }
Beispiel #2
0
    private void Awake()
    {
        s_singleton = this;

        m_ambianceAudioSource = GetComponent <AudioSource>();
        _PlayMainAmbiance();
    }
Beispiel #3
0
 public void StartLobbyServer()
 {
     if (m_lobbyDiscovery.StartAsServer() && StartServer())
     {
         MenuManager.ShowServerUI();
         GalaxyAudioPlayer.PlayLobbyAmbiance();
     }
 }
Beispiel #4
0
 private void RpcUseAPower(int powersAvailable)
 {
     if (isLocalPlayer)
     {
         GalaxyAudioPlayer.PlayPowerSound();
     }
     _UseAPower(powersAvailable);
 }
Beispiel #5
0
 private void _SetRoamerReady(bool ready)
 {
     if (ready)
     {
         GalaxyAudioPlayer.PlayReadySong();
     }
     m_roamerReady = ready;
     MenuManager.UpdateLobbyMenu();
 }
Beispiel #6
0
 private void CmdSetRoamerReady(bool ready)
 {
     if (ready)
     {
         GalaxyAudioPlayer.PlayReadySong();
     }
     RpcSetRoamerReady(ready);
     _SetRoamerReady(ready);
     CheckAllPlayersAreReady();
 }
Beispiel #7
0
    private void RpcMarkFlag(int powersAvailable, int totalFlagsCaptured, int score)
    {
        m_powersAvailable    = powersAvailable;
        m_totalFlagsCaptured = totalFlagsCaptured;
        m_score = score;

        if (isLocalPlayer && (m_powersAvailable == 1))
        {
            GalaxyAudioPlayer.PlayPowerAvailableSound();
        }
    }
Beispiel #8
0
 private void _Goal(int score)
 {
     m_score = score;
     GoalUI.ShowGoalUI();
     GalaxyAudioPlayer.PlayGoalSound();
     if (m_humanTeam)
     {
         Fireworks.UseBlueFireworks();
     }
     else
     {
         Fireworks.UseRedFireworks();
     }
 }
Beispiel #9
0
    public void SetSnooperReady()
    {
        if (LobbyClientMenuManager.isReadyAnimationInProgressForSnooper)
        {
            return;
        }

        if (!m_snooperReady)
        {
            GalaxyAudioPlayer.PlayReadySong();
        }
        LobbyClientMenuManager.SetSnooperReady(!m_snooperReady);
        CmdSetSnooperReady(!m_snooperReady);
    }
Beispiel #10
0
    private void _AttachToSnooper(bool isHumanSnooper)
    {
        if (isHumanSnooper)
        {
            m_taker = Snooper.humanSnooper;
        }
        else
        {
            m_taker = Snooper.robotSnooper;
        }

        m_taker.PickFlag();
        GalaxyAudioPlayer.PlaySnooperCatchesFlagSound();
    }
Beispiel #11
0
    private IEnumerator PreparationPhase()
    {
        m_snooperCanMove = false;
        for (int i = 3; i >= 0; i--)
        {
            PreparationCountdown.ShowPreparationNumber(i);
            if (i != 0)
            {
                GalaxyAudioPlayer.PlaySmallBip();
            }
            else
            {
                GalaxyAudioPlayer.PlayLongBip();
            }
            yield return(new WaitForSeconds(1.0f));
        }

        PreparationCountdown.ShowPreparationNumber(-1);
        m_snooperCanMove = true;
    }
Beispiel #12
0
    public void ShowPlayScene()
    {
        m_playScene.SetActive(true);
        m_lobbyScene.SetActive(false);

        m_playersCameras.SetActive(NetworkClient.active);
        foreach (Camera camera in m_serverCameras)
        {
            camera.gameObject.SetActive(NetworkServer.active);
        }
        ClientUI.ShowClientUI(NetworkClient.active);
        SnooperUI.ShowSnooperPlayUI(NetworkClient.active);

        if (NetworkServer.active)
        {
            m_lobbyDiscovery.StopBroadcast();
            ServerUI.ShowServerUI(true);
            RoundManager.StartRound();
            TrapManager.StartSpawningTrap();
            GalaxyAudioPlayer.PlayMainAmbiance();
        }
    }
Beispiel #13
0
 private void _Detach()
 {
     m_taker = null;
     GalaxyAudioPlayer.PlaySnooperDropsFlagSound();
 }