//f**k you dumb implementation public Coordinates5 UpdateLocation(Sector curSector, Vector2 curPosition) { Coordinates5 curCoords = curSector.coords; Coordinates5 newCoords = curCoords; //in case this fails for whatever reason, ship won't change its world location if (curPosition.X < 0) { //move to the left } else if (curPosition.X > curSector.borderLength) { //move to the right } if (curPosition.Y < 0) { //move up } else if (curPosition.Y > curSector.borderLength) { //move down } return(newCoords); }
public Sector(Coordinates5 coords, int borderLength) { this.coords = coords; this.borderLength = borderLength; }
public Sector FetchNewSector(Coordinates5 coords, int wmod, int vmod) { coords.W += wmod; coords.V += vmod; return(FetchSector(coords)); }
public Sector FetchSector(Coordinates5 coords) { return(quadrants[coords.X].systems[coords.Y][coords.Z].sectors[coords.W][coords.V]); }