public Waypoint(int id, WaypointType type, int xWaypointRange, int yWaypointRange, string label, WaypointLocation location, string action) { Id = id; Type = type; Label = label; Location = location; Action = action; XWaypointRange = xWaypointRange; YWaypointRange = yWaypointRange; }
public WaypointLocation(WaypointLocation location, WaypointDirection direction) { Tuple <int, int> directionOffset = new Tuple <int, int>(0, 0); //Horizontal Axis, Vertical Axis switch (direction) { case WaypointDirection.NorthWest: directionOffset = new Tuple <int, int>(-1, -1); break; case WaypointDirection.North: directionOffset = new Tuple <int, int>(0, -1); break; case WaypointDirection.NorthEast: directionOffset = new Tuple <int, int>(+1, -1); break; case WaypointDirection.East: directionOffset = new Tuple <int, int>(+1, 0); break; case WaypointDirection.SouthEast: directionOffset = new Tuple <int, int>(+1, +1); break; case WaypointDirection.South: directionOffset = new Tuple <int, int>(0, +1); break; case WaypointDirection.SouthWest: directionOffset = new Tuple <int, int>(-1, +1); break; case WaypointDirection.West: directionOffset = new Tuple <int, int>(-1, 0); break; case WaypointDirection.Center: directionOffset = new Tuple <int, int>(0, 0); break; } X = location.X + directionOffset.Item1; Y = location.Y + directionOffset.Item2; Z = location.Z; }