Beispiel #1
0
        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);
        }
Beispiel #2
0
        public void DropItem(ObjectId itemId, ObjectId targetContainerId, Location2D targetContainerLocation)
        {
            var dropPacket = new DropItemRequest(itemId, targetContainerId, targetContainerLocation);

            Send(dropPacket.RawPacket);
        }
Beispiel #3
0
        public void DropItem(ObjectId itemId, ObjectId targetContainerId, Location2D targetContainerLocation)
        {
            var dropPacket = packetRegistry.Instantiate <DropItemRequest>();

            Send(dropPacket.Serialize(itemId, targetContainerId, targetContainerLocation));
        }
Beispiel #4
0
 public bool Equals(Location2D other) => X == other.X && Y == other.Y;