public Shockwave(PacketReader reader) { this.Location = new Vector2( NetPacker.ShortToBigFloat(reader.ReadInt16()), NetPacker.ShortToBigFloat(reader.ReadInt16())); this.size = NetPacker.ShortToMidFloat(reader.ReadInt16()); this.refract = reader.ReadBoolean(); this.owner = -1; this.Exists = true; this.frame = .5f; }
public void ReadFromNet(PacketReader reader) { Loc.X = NetPacker.ShortToBigFloat(reader.ReadInt16()); Loc.Y = NetPacker.ShortToBigFloat(reader.ReadInt16()); Anim = NetPacker.ShortToInt(reader.ReadInt16()); AnimFrame = NetPacker.ShortToInt(reader.ReadInt16()); AnimName = charDef.GetAnimation(Anim).name; frame = NetPacker.ShortToMidFloat(reader.ReadInt16()); if (reader.ReadBoolean()) { State = CharState.Air; } else { State = CharState.Grounded; } if (reader.ReadBoolean()) { Face = CharDir.Right; } else { Face = CharDir.Left; } Trajectory.X = NetPacker.ShortToBigFloat(reader.ReadInt16()); Trajectory.Y = NetPacker.ShortToBigFloat(reader.ReadInt16()); KeyRight = reader.ReadBoolean(); KeyLeft = reader.ReadBoolean(); HP = NetPacker.ShortToInt(reader.ReadInt16()); ReceivedNetUpdate = true; }