/// <summary> /// Copy constructor. /// </summary> /// <param name="o">object being copied</param> public AstronomicalObject(AstronomicalObject o) { this.objType = o.objType; this.objMass = o.objMass; this.distFromPrimary = o.distFromPrimary; this.stellarBrightness = o.stellarBrightness; this.objectDestroyed = o.objectDestroyed; }
/// <summary> /// Copy constructor /// </summary> /// <param name="p">Planet being copied</param> public Planet(Planet p) { this.parentPtr = p.parentPtr; this.locCode = p.locCode; this.orbitalRadius = p.orbitalRadius; }
/// <summary> /// Constructor placing an unset planet (orbit) in place. /// </summary> /// <param name="parent">The parent object. This is a pointer to it.</param> /// <param name="loc">The zone this orbit is in.</param> /// <param name="radius">The orbital radius.</param> public Planet(AstronomicalObject parent, PlanetaryZone loc, double radius) { this.parentPtr = parent; this.locCode = loc; this.orbitalRadius = radius; }
/// <summary> /// Base constructor /// </summary> public Planet() { this.parentPtr = null; this.locCode = PlanetaryZone.UnknownZone; this.orbitalRadius = 0; }