Ejemplo n.º 1
0
    void DrawEndOfMatchText()
    {
        Team winningTeam = m_Gamemode.GetWinningTeam();

        if (winningTeam == Team.Blue)
        {
            GUI.color = Color.blue;
            GUI.Label(new Rect(0, 0, Screen.width, 200), "Blue Team won!", Styles.EndMatchLabel);
        }
        else if (winningTeam == Team.Red)
        {
            GUI.color = Color.red;
            GUI.Label(new Rect(0, 0, Screen.width, 200), "Red Team won!", Styles.EndMatchLabel);
        }
        else
        {
            GUI.color = Color.white;
            GUI.Label(new Rect(0, 0, Screen.width, 200), "Both Teams are tied!", Styles.EndMatchLabel);
        }

        GUI.color = Color.white;
        GUI.Label(new Rect(0, Screen.height * 0.5f + 140, Screen.width, 50), "Next Map: " + MapQueue.GetNextMap(), Styles.LabelSmallCentered);

        if (PhotonNetwork.isMasterClient == true && m_Gamemode.GetEndRoundTime() > 2f)
        {
            float blinkAlpha = (int)(m_Gamemode.GetEndRoundTime() * 2) % 2;

            GUI.color = new Color(1f, 1f, 1f, blinkAlpha);
            GUI.Label(new Rect(0, 0, Screen.width, Screen.height), "Press any key to load the next map.", LabelStyleCentered);
        }
    }