Exemple #1
0
        public static List <SyncedData> Decode(byte[] data)
        {
            List <SyncedData> @new = SyncedData.poolList.GetNew();

            @new.Clear();
            int i   = 0;
            int num = BitConverter.ToInt32(data, i);

            i += 4;
            byte ownerID = data[i++];
            byte b       = data[i++];
            bool flag    = data[i++] == 1;
            int  num2    = num;

            while (i < data.Length)
            {
                SyncedData new2 = SyncedData.pool.GetNew();
                new2.Init(ownerID, num2--);
                new2.inputData.Deserialize(data, ref i);
                @new.Add(new2);
            }
            bool flag2 = @new.Count > 0;

            if (flag2)
            {
                @new[0].dropPlayer       = flag;
                @new[0].dropFromPlayerId = b;
            }
            return(@new);
        }
Exemple #2
0
        public SyncedData clone()
        {
            SyncedData @new = SyncedData.pool.GetNew();

            @new.Init(this.inputData.ownerID, this.tick);
            @new.inputData.CopyFrom(this.inputData);
            return(@new);
        }
Exemple #3
0
 public bool EqualsData(SyncedData other)
 {
     return(this.inputData.EqualsData(other.inputData));
 }