Exemplo n.º 1
0
        // override public void OnEnable()
        // {
        //     base.OnEnable();
        //     InitializePlayerList();
        // }

        override public void OnPlayerPropertiesUpdate(Player target, ExitGames.Client.Photon.Hashtable changedProps)
        {
            PreGamePlayerListing playerListing = GetPlayerListing(target);
            object readyObject;

            if (changedProps.TryGetValue("ready", out readyObject))
            {
                playerListing.SetReady((bool)readyObject);
            }
            else
            {
                playerListing.SetReady(false);
            }
        }
Exemplo n.º 2
0
        private void AddPlayerToList(Player newPlayer)
        {
            PreGamePlayerListing playerListing = FindBlankListing();

            if (playerListing != null)
            {
                playerListing.InitializeListing(newPlayer.ActorNumber, newPlayer.NickName);
                object readyObject;
                if (newPlayer.CustomProperties.TryGetValue("ready", out readyObject))
                {
                    playerListing.SetReady((bool)readyObject);
                }
            }
        }