Example #1
0
        //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);
        }
Example #2
0
 public Sector(Coordinates5 coords, int borderLength)
 {
     this.coords       = coords;
     this.borderLength = borderLength;
 }
Example #3
0
 public Sector FetchNewSector(Coordinates5 coords, int wmod, int vmod)
 {
     coords.W += wmod;
     coords.V += vmod;
     return(FetchSector(coords));
 }
Example #4
0
 public Sector FetchSector(Coordinates5 coords)
 {
     return(quadrants[coords.X].systems[coords.Y][coords.Z].sectors[coords.W][coords.V]);
 }