void OnLevelWon(TeamBase team)
    {
        bool didThisPlayerWin = false;

        if (!isMultiplayerLevel)
        {
            didThisPlayerWin = !team.IsTeamAI();
        }
        else
        {
            didThisPlayerWin = team.GetLocalPlayerNumber() == team.GetTeamNumber();
        }

        panelText.text = didThisPlayerWin ? levelWinText : levelLoseText;
        levelCompletedPanel.SetActive(true);
    }
Beispiel #2
0
    void OnTeamTurnStarted(TeamBase team)
    {
        PhotonView photonView = GetComponent <PhotonView>();

        photonView.RPC("UpdateUIOnTurnStart", RpcTarget.All, team.GetTeamNumber());
    }