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 AddStar(Star newStar) { SysStars.Add(newStar); }