예제 #1
0
 public Player(QueryProcessor.PlayerInfo info, GameObject template, GameObject parent, int id)
 {
     this.playerInfo = info;
     this.record     = UnityEngine.Object.Instantiate <GameObject>(template, parent.transform).GetComponent <PlayerRecord>();
     this.record.gameObject.transform.localScale = Vector3.one;
     this.record.Setup(id, (!(this.playerInfo.instance == null)) ? ("Player: " + this.playerInfo.instance.GetComponent <NicknameSync>().myNick) : "(unconnected)");
 }
        public static QueryProcessor.PlayerInfo[] _ReadArrayPlayerInfo_None(NetworkReader reader)
        {
            int num = (int)reader.ReadUInt16();

            if (num == 0)
            {
                return(new QueryProcessor.PlayerInfo[0]);
            }
            QueryProcessor.PlayerInfo[] array = new QueryProcessor.PlayerInfo[num];
            for (int i = 0; i < num; i++)
            {
                array[i] = GeneratedNetworkCode._ReadPlayerInfo_QueryProcessor(reader);
            }
            return(array);
        }
 public static void _WritePlayerInfo_QueryProcessor(NetworkWriter writer, QueryProcessor.PlayerInfo value)
 {
     writer.Write(value.address);
     writer.Write(value.instance);
     writer.Write(value.time);
 }