Ejemplo n.º 1
0
    public void LoadLoggedPlayerOwners(string[] arsSplitLogs)
    {
        Debug.Assert(arsSplitLogs[0] == "po");

        int playerowner0, playerowner1;

        if (int.TryParse(arsSplitLogs[1], out playerowner0) == false || playerowner0 < 0)
        {
            Debug.LogErrorFormat("Error! {0} was not a valid player owner to be loaded", arsSplitLogs[1]);
            return;
        }
        if (int.TryParse(arsSplitLogs[2], out playerowner1) == false || playerowner1 < 0)
        {
            Debug.LogErrorFormat("Error! {0} was not a valid player owner to be loaded", arsSplitLogs[2]);
            return;
        }

        NetworkMatchSetup.SetPlayerOwner(0, playerowner0);
        NetworkMatchSetup.SetPlayerOwner(1, playerowner1);
    }
 public void OnOwnerSelectChange()
 {
     NetworkMatchSetup.SetPlayerOwner(plyrselectorParent.idPlayer, dropdown.value + 1); //Offset by one since our internalplayer ids start at 0
 }