コード例 #1
0
 public void Deserialize(ref DataStreamReader reader)
 {
     SlotNumber  = reader.ReadUIntNetworkByteOrder();
     SlotContent = (PowerupSlotContent)reader.ReadUIntNetworkByteOrder();
     switch (SlotContent)
     {
     case PowerupSlotContent.Laser:
         LaserPowerupSlotData *slotData = (LaserPowerupSlotData *)UnsafeUtility.Malloc(sizeof(LaserPowerupSlotElement), sizeof(LaserPowerupSlotElement), Unity.Collections.Allocator.Persistent);
         slotData->RemainingShots = reader.ReadUIntNetworkByteOrder();
         SlotData = slotData;
         break;
     }
 }
コード例 #2
0
        public void FromStream(DataStreamReader reader, ref DataStreamReader.Context ctx)
        {
            QueryHeader.FromStream(reader, ref ctx);
            ChunkLen = reader.ReadUIntNetworkByteOrder(ref ctx);

            ServerInfoData.FromStream(reader, ref ctx);
        }
コード例 #3
0
 public void FromStream(DataStreamReader reader, ref DataStreamReader.Context ctx)
 {
     Type        = reader.ReadByte(ref ctx);
     ChallangeId = reader.ReadUIntNetworkByteOrder(ref ctx);
 }
コード例 #4
0
 public void Deserialize(ref DataStreamReader reader)
 {
     slotNumber = reader.ReadUIntNetworkByteOrder();
 }
コード例 #5
0
 public void Deserialize(ref DataStreamReader reader)
 {
     Position = reader.ReadUIntNetworkByteOrder();
 }
コード例 #6
0
 public void Deserialize(ref DataStreamReader reader)
 {
     CountdownSeconds = reader.ReadUIntNetworkByteOrder();
 }
コード例 #7
0
 public void Deserialize(ref DataStreamReader reader)
 {
     PowerupId = reader.ReadUIntNetworkByteOrder();
     Enabled   = Convert.ToBoolean(reader.ReadByte());
 }