示例#1
0
        public Sector(SectorCoord coord)
        {
            this.Coord = coord;

            //things to be looked up from data somehow
            Color = Galaxy.GetColorAt(coord.X, coord.Y, coord.Z);
            float saturation = Color.GetSaturation();

            if (saturation < .4)
            {
                DominantStarType = Star.F;
            }
            else
            {
                DominantStarType = Star.hueToType[Convert.ToInt32(Color.GetHue() / 30)];
            }

            float sectorIntensity = Color.GetBrightness();

            if (sectorIntensity < .1)
            {
                sectorIntensity = .01f;
            }
            StellarDensity = .014f * sectorIntensity;             //stars per cubic light year
            //if (STELLAR_DENSITY == 0) STELLAR_DENSITY = .00001f;
        }
示例#2
0
 public SolarSystem(int index, Sector parentSector, Vector3 pos, FastRandom rand)
 {
     ParentSector      = parentSector;
     ParentSectorCoord = parentSector.Coord;
     Index             = index;
     Pos  = pos;
     Star = new Star(this, rand);
 }