public Blood(PacketReader reader) { this.Location = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.Trajectory = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.r = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.g = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.b = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.a = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.size = NetPacker.ShortToSmallFloat(reader.ReadInt16()); this.flag = NetPacker.SbyteToInt(reader.ReadSByte()); this.owner = -1; this.Exists = true; this.rotation = GlobalFunctions.GetAngle(new Vector2(), Trajectory); this.frame = Rand.GetRandomFloat(0.3f, 0.7f); }
public Rocket(PacketReader reader) { this.Location = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.Trajectory = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.owner = NetPacker.SbyteToInt(reader.ReadSByte()); this.frame = 4f; this.Exists = true; }
public Fire(PacketReader reader) { this.Location = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.Trajectory = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.size = NetPacker.ShortToSmallFloat(reader.ReadInt16()); this.flag = NetPacker.SbyteToInt(reader.ReadSByte()); this.frame = NetPacker.ShortToSmallFloat(reader.ReadInt16()); this.Exists = true; this.additive = true; }
public Smoke(PacketReader reader) { this.Location = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.Trajectory = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.r = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.g = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.b = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.a = NetPacker.ByteToTinyFloat(reader.ReadByte()); this.size = NetPacker.ShortToSmallFloat(reader.ReadInt16()); this.flag = NetPacker.SbyteToInt(reader.ReadSByte()); this.owner = -1; this.Exists = true; this.frame = 1.0f; }