コード例 #1
0
 /// <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;
 }
コード例 #2
0
 /// <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;
 }
コード例 #3
0
 /// <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;
 }
コード例 #4
0
 /// <summary>
 /// Base constructor
 /// </summary>
 public Planet()
 {
     this.parentPtr = null;
     this.locCode = PlanetaryZone.UnknownZone;
     this.orbitalRadius = 0;
 }