Ejemplo n.º 1
0
    public void EditPlayerListWithScore(string nPlayer)
    {
        if (uLink.Network.isServer)
        {
            networkView.RPC("EditPlayerListWithScore", uLink.RPCMode.Others, nPlayer);
        }
        for (int i = 0; i < PlayerList.Count; i++)
        {
            if (PlayerList[i].playerName == nPlayer)
            {
                PlayerList[i].playerScore++;

                if (PlayerList[i].playerTeam == "blue")
                {
                    scoreScript.UpdateBlueTeamScore();
                }
                else
                {
                    scoreScript.UpdateRedTeamScore();
                }
            }
        }
    }
Ejemplo n.º 2
0
    public void EditPlayerListWithScorePhoton(string nPlayer)
    {
        //photonView.RPC("EditPlayerListWithScore", PhotonTargets.Others, nPlayer);
        //if (uLink.Network.isServer)
        //{
        //photonView.RPC("EditPlayerListWithScore", PhotonTargets.Others, nPlayer);
        //}
        for (int i = 0; i < PlayerList.Count; i++)
        {
            if (PlayerList[i].playerName == nPlayer)
            {
                PlayerList[i].playerScore++;

                if (PlayerList[i].playerTeam == "blue")
                {
                    scoreScript.UpdateBlueTeamScore();
                }
                else
                {
                    scoreScript.UpdateRedTeamScore();
                }
            }
        }
    }