예제 #1
0
 public Coords(GalacticLocation location)
 {
     this._galacticLocation = location;
     this._sectorLocation   = _galacticLocation.ToSectorLocation();
     this._screenLocation   = new ScreenLocation(_sectorLocation);
     this._sectorIndexX     = (uint)(_galacticLocation.X / GalaxyConstants.SectorWidth);
     this._sectorIndexY     = (uint)(_galacticLocation.Y / GalaxyConstants.SectorWidth);
 }
예제 #2
0
 public Coords(uint sectorIndexX, uint sectorIndexY, int sX, int sY, int sZ)
 {
     this._sectorIndexX     = sectorIndexX;
     this._sectorIndexY     = sectorIndexY;
     this._sectorLocation   = new SectorLocation(sX, sY, sZ);
     this._galacticLocation = new GalacticLocation(_sectorIndexX, _sectorIndexY, _sectorLocation);
     this._screenLocation   = new ScreenLocation(_sectorLocation);
 }
예제 #3
0
 public Coords(uint sectorIndexX, uint sectorIndexY, SectorLocation sectorLocation)
 {
     this._sectorIndexX     = sectorIndexX;
     this._sectorIndexY     = sectorIndexY;
     this._sectorLocation   = new SectorLocation(sectorLocation.X, sectorLocation.Y, sectorLocation.Z);
     this._galacticLocation = new GalacticLocation(sectorIndexX, sectorIndexY, sectorLocation);
     this._screenLocation   = new ScreenLocation(sectorLocation);
 }
예제 #4
0
 public Coords(uint sectorIndexX, uint sectorIndexY)
 {
     this._sectorIndexX     = sectorIndexX;
     this._sectorIndexY     = sectorIndexY;
     this._sectorLocation   = new SectorLocation(0, 0, 0);
     this._galacticLocation = new GalacticLocation(sectorIndexX, sectorIndexY, _sectorLocation);
     this._screenLocation   = new ScreenLocation(_sectorLocation);
 }
예제 #5
0
        public Coords(SerializationInfo info, StreamingContext context)
        {
            this._sectorIndexX = info.GetUInt32("sectorIndexX");
            this._sectorIndexY = info.GetUInt32("sectorIndexY");
            int sX, sY, sZ;

            sX = info.GetInt32("sX");
            sY = info.GetInt32("sY");
            sZ = info.GetInt32("sZ");

            this._sectorLocation   = new SectorLocation(sX, sY, sZ);
            this._galacticLocation = new GalacticLocation(_sectorIndexX, _sectorIndexY, _sectorLocation);
            this._screenLocation   = new ScreenLocation(_sectorLocation);
        }