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); } }
public override void Serialize(NetworkWriter writer) { writer.Write(Position); DirectionIO.writeDirectionToBuffer(Direction, writer); writer.Write(BulletID); }
public override void Serialize(NetworkWriter writer) { writer.Write(Position); DirectionIO.writeDirectionToBuffer(Orientation, writer); writer.Write(HP); }