コード例 #1
0
 public override void Serialize(NetworkWriter writer)
 {
     writer.Write(NewPosition.HasValue);
     if (NewPosition.HasValue)
     {
         writer.Write(NewPosition.Value);
     }
     writer.Write(NewOrientation.HasValue);
     if (NewOrientation.HasValue)
     {
         DirectionIO.writeDirectionToBuffer(NewOrientation.Value, writer);
     }
     writer.Write(BulletsCreated.Count);
     foreach (var bullet in BulletsCreated)
     {
         bullet.Serialize(writer);
     }
 }
コード例 #2
0
 public override void Serialize(NetworkWriter writer)
 {
     writer.Write(Position);
     DirectionIO.writeDirectionToBuffer(Direction, writer);
     writer.Write(BulletID);
 }
コード例 #3
0
 public override void Serialize(NetworkWriter writer)
 {
     writer.Write(Position);
     DirectionIO.writeDirectionToBuffer(Orientation, writer);
     writer.Write(HP);
 }