void GenerateStars() { GenerateHumanHomeStar(); // generate the human home system int starCount = gameDataRef.TotalSystems; for (int i = 0; i < starCount; i++) { Vector3 starLoc = DetermineStarLocation(); StarData newStar = new StarData(); newStar = GenerateGameObject.CreateNewStar(); // this creates the star and adds the data/accessor components // if the star type is 'no star', break this loop, and if it is too high (no specials or wolf rayet yet) no star either (yet) if ((int)newStar.SpectralClass >= 12) { newStar.SpectralClass = StarData.eSpectralClass.NoStar; } if (newStar.SpectralClass == 0) { continue; } newStar.SetWorldLocation(starLoc); gData.AddStarDataToList(newStar); } gData.galaxyIsGenerated = true; // add more checks here }
void GenerateHumanHomeStar() { // create New Terra Vector3 starLoc = new Vector3(0, 0, 0); StarData newStar = new StarData(); newStar.SpectralClass = StarData.eSpectralClass.G; newStar.Age = 7; newStar.starMultipleType = StarData.eStarMultiple.Single; newStar.Size = 8; newStar.Metallicity = 8.0; newStar.Name = "Neo-Sirius"; newStar.ID = "STANEOS001"; newStar.SetWorldLocation(starLoc); gData.AddStarDataToList(newStar); }