public void AddMoonByOrbitalRadius(Moon moon, double radius, double coveredAngle) { RemoveMoon(moon.Name); this.Moons.Add(moon); moon.AttachToPlanet(this); Physics.EnterOrbitByGivenRadius(ref moon, this, radius, coveredAngle); }
public void AddMoonByOrbitalSpeed(Moon moon, double speed, double coveredAngle) { RemoveMoon(moon.Name); this.Moons.Add(moon); moon.AttachToPlanet(this); Physics.EnterOrbitByGivenSpeed(ref moon, this, speed, coveredAngle); }
public PlanetarySystem Clone() { PlanetarySystem clone = new PlanetarySystem(this.Name); Star cloneStar = new Star(this.Star); clone.SetStar(cloneStar); this.Planets.ToList().ForEach(pl => { Planet clonePlanet = new Planet(pl); clone.AddPlanetNOTORBITALSAFE(clonePlanet); pl.Moons.ToList().ForEach(m => { Moon cloneMoon = new Moon(m); pl.AddMoonNOTORBITALSAFE(cloneMoon); }); }); this.Asteroids.ToList().ForEach(a => { Asteroid cloneAsteroid = new Asteroid(a); clone.AddAsteroid(cloneAsteroid); }); this.ArtificialObjects.ToList().ForEach(artObj => { ArtificialObject cloneArtObj = new ArtificialObject(artObj); clone.AddArtificialObject(cloneArtObj); }); return(clone); }
public void AddMoonByOrbitalSpeed(Moon moon, Planet planet, double speed, double coveredAngle) { var dummy = planet; var dummy2 = moon; planet.AddMoonByOrbitalSpeed(moon, speed, coveredAngle); }
public void AddMoonNOTORBITALSAFE(Moon moon) { RemoveMoon(moon.Name); this.Moons.Add(moon); moon.AttachToPlanet(this); }
public void AddMoonNOTORBITALSAFE(Moon moon, Planet planet) { planet.AddMoonNOTORBITALSAFE(moon); }
public void AddMoonByOrbitalRadius(Moon moon, Planet planet, double radius, double coveredAngle) { planet.AddMoonByOrbitalRadius(moon, radius, coveredAngle); }
public Moon(Moon moon) : this(moon.Center, moon.Mass, moon.Radius, moon.Velocity, moon.Name) { }