public Planet(Texture2D texture, Vector2 scale, int radius, float interval, float degrees, Star centerStar, int terraform, Texture2D alphaTexture)
 {
     position = new Vector2();
     Counter = degrees * 10;
     position.X = (float)((centerStar.CenterX) + radius * Math.Cos(Counter / 10 * Math.PI / 180) - ((texture.Width * scale.X) / 2));
     position.Y = (float)((centerStar.CenterY) + radius * Math.Sin(Counter / 10 * Math.PI / 180) - ((texture.Height * scale.Y) / 2));
     Scale = scale;
     FinalWidth = position.X + texture.Width * scale.X;
     FinalHeight = position.Y + texture.Height * scale.Y;
     Radius = radius;
     Interval = interval;
     CenterStar = centerStar;
     this.terraform = terraform;
     Owner = "Unknown";
     Race = "No race";
     Texture = texture;
     Origin = new Vector2(texture.Width / 2, texture.Height / 2);
     Query = new ProductQuery();
     PositionFromCenter = Vector2.Zero;
     IsPressed = false;
     Rotation = 0;
     ShipsOnOrbit = new List<Ship>();
     IsVisible = true;
     IsTerraforming = false;
 }
 public SolarSystem(Star star)
 {
     objects = new List<IDraw>();
     Collision = new List<IMoveble>();
     Planets = new List<IDraw>();
     Asteroids = new List<IDraw>();
     Ships = new List<IDraw>();
     objects.Add(star);
     IsVisible = true;
 }
 public Planet(Texture2D texture, Vector2 scale, int radius, float interval, float degrees, Star centerStar)
     : this(texture, scale, radius, interval, degrees, centerStar, 0)
 {
 }
 public Planet(Texture2D texture, Vector2 scale, int radius, float interval, float degrees, Star centerStar, int terraform)
     : this(texture, scale, radius, interval, degrees, centerStar, terraform, (Texture2D)new object())
 {
 }
        //--------------------------------------------------------------
        //GENERATE SOLAR SYSTEM
        //--------------------------------------------------------------
        private void GenerateSolarSystem(StarOnMap star)
        {
            //Construct star name
            string tempName = ConstructName();
            star.Name = tempName;
            //End name construction
            //Generating Solar System
            Random starType = new Random();

            string starTextureStr = starsTextures[starType.Next(0, starsTextures.Length)];
            Texture2D starTexture = Content.Load<Texture2D>
                ("Stars/"+starTextureStr);

            //Here take a starcolor'
            string color = GetColor(starTextureStr);

            Star tempStar = new Star(starTexture, CenterPoint, new Vector2(Scales.None), color);
            //Copy star name to solar star name
            tempStar.Name = tempName;
            SolarSystem ss = new SolarSystem(tempStar);
            ss.BackGround = CreateBackground("SystemBacks/"+
                systemBackTextures[new Random().Next(0, systemBackTextures.Length)], Scales.None, 255f);

            //NEW PLANET GENERATING
            GeneratingPlanets(ss);
            //END NEW PLANET GENERATING
            GeneratingAsteroids(ss);
            //End generating solar system
            star.SS = ss;
        }