public ushort GetDistance(Location2D secondLocation) { var vector = this - secondLocation; var distance = Math.Sqrt(Math.Pow(vector.X, 2) + Math.Pow(vector.Y, 2)); return((ushort)distance); }
public void DropItem(ObjectId itemId, ObjectId targetContainerId, Location2D targetContainerLocation) { var dropPacket = new DropItemRequest(itemId, targetContainerId, targetContainerLocation); Send(dropPacket.RawPacket); }
public void DropItem(ObjectId itemId, ObjectId targetContainerId, Location2D targetContainerLocation) { var dropPacket = packetRegistry.Instantiate <DropItemRequest>(); Send(dropPacket.Serialize(itemId, targetContainerId, targetContainerLocation)); }
public bool Equals(Location2D other) => X == other.X && Y == other.Y;