public override void NetWrite(PacketWriter writer) { writer.Write(NetGame.MSG_PARTICLE); writer.Write(Particle.PARTICLE_BULLET); writer.Write(Background); writer.Write(NetPacker.BigFloatToShort(Location.X)); writer.Write(NetPacker.BigFloatToShort(Location.Y)); writer.Write(NetPacker.BigFloatToShort(Trajectory.X)); writer.Write(NetPacker.BigFloatToShort(Trajectory.Y)); writer.Write(NetPacker.IntToShort(owner)); }
public void WriteToNet(PacketWriter writer) { writer.Write(NetGame.MSG_CHARACTER); writer.Write(NetPacker.IntToSbyte(charDef.DefID)); writer.Write(NetPacker.IntToSbyte(Team)); writer.Write(NetPacker.IntToSbyte(ID)); writer.Write(NetPacker.BigFloatToShort(Loc.X)); writer.Write(NetPacker.BigFloatToShort(Loc.Y)); writer.Write(NetPacker.IntToShort(Anim)); writer.Write(NetPacker.IntToShort(AnimFrame)); writer.Write(NetPacker.MidFloatToShort(frame)); if (State == CharState.Air) { writer.Write(true); } else { writer.Write(false); } if (Face == CharDir.Right) { writer.Write(true); } else { writer.Write(false); } writer.Write(NetPacker.BigFloatToShort(Trajectory.X)); writer.Write(NetPacker.BigFloatToShort(Trajectory.Y)); writer.Write(KeyRight); writer.Write(KeyLeft); writer.Write(NetPacker.IntToShort(HP)); }