public void AddStar(int selfId, int parent, int order) { if (Math.Abs(SysAge) < 0) { throw new Exception("This star system needs an age."); } //Set flags here. var curPos = SysStars.Count; if (selfId == Star.IsSecondary) { Star2Index = curPos; } if (selfId == Star.IsSeccomp) { SubCompanionStar2Index = curPos; } if (selfId == Star.IsTrinary) { Star3Index = curPos; } if (selfId == Star.IsTricomp) { SubCompanionStar3Index = curPos; } //add it now SysStars.Add(new Star(SysAge, parent, selfId, order, SysName)); }
public void ResetSystem() { SysAge = 0.0; MaxMass = 0.0; NumDwarfPlanets = 0; HelioPause = 0.0; SubCompanionStar2Index = 0; SubCompanionStar3Index = 0; Star2Index = 0; Star3Index = 0; SysStars.Clear(); HabitableZones.Clear(); }
public void AddStar(Star newStar) { SysStars.Add(newStar); }
/// <summary> /// This counts the total number of planets in this solar system /// </summary> /// <returns>Returns an integer of the number of planets</returns> public int CountPlanets() { return(SysStars.Sum(t => t.SysPlanets.Count)); }