public void AddNewPlayer(NetworkPrint print)
        {
            Debug.Log("(4) MultiplayerManager: AddNewPlayerCalled called");
            print.transform.parent = mRef.referencesParent;
            PlayerHolder playerH = mRef.AddNewPlayer(print);

            if (print.isLocal)
            {
                mRef.localPlayer = playerH;
            }
        }
        public PlayerHolder AddNewPlayer(NetworkPrint p)
        {
            Debug.Log("(5) MultiplayerReferences: AddNewPlayer called");
            if (!IsUniquePlayer(p.photonId))
            {
                return(null);
            }

            PlayerHolder playerHolder = new PlayerHolder
            {
                photonId = p.photonId,
                print    = p,
                health   = 100
            };

            players.Add(playerHolder);
            return(playerHolder);
        }
예제 #3
0
        public void AddPlayer(NetworkPrint n_print)

        {
            players.Add(n_print);
        }