private void OnGUI()
    {
        Transform effect;

        if (GUI.Button(new Rect(new Vector2(0, 0), new Vector2(100f, 50f)), "Glasses For Player 1"))
        {
            effect = Instantiate(m_effect.transform);
            ObjectsFollow.FollowCharacter(effect, m_player1.transform.position);
        }
        if (GUI.Button(new Rect(new Vector2(0, 50f), new Vector2(100f, 50f)), "Glasses For Player 2"))
        {
            effect = Instantiate(m_effect.transform);
            ObjectsFollow.FollowCharacter(effect, m_player2.transform.position);
        }
        if (GUI.Button(new Rect(new Vector2(0, 100f), new Vector2(100f, 50f)), "Team Wins"))
        {
            UIWins ui = new UIWins(m_teamName, m_color);
        }
        if (GUI.Button(new Rect(new Vector2(0, 150f), new Vector2(100f, 50f)), "Active UIWins"))
        {
            UIWins ui = new UIWins(m_teamName, m_color);
            ui.ActiveUIWins(true);
        }
        if (GUI.Button(new Rect(new Vector2(0, 200f), new Vector2(100f, 50f)), "Desactive UIWins"))
        {
            UIWins ui = new UIWins(m_teamName, m_color);
            ui.ActiveUIWins(false);
        }
    }
Exemplo n.º 2
0
    public void DoEndGame(bool victory, Faction faction)
    {
        gameIsStarted = false;
        UIWinInterfaceScript.ActiveUIWins(true);
        UIWinInterfaceScript.SetInfo(GetFactionStringFromFaction(faction), faction.FactionColor);
        //TODO prévenir les joeurs par chat que la partie est terminée
        //TODO afficher l'écran de fin de jeu pendant x sec

        Invoke("RestartGame", TimeBeforeRestart);
    }