public void Evolve() { StarEvolution starEvolution = new StarEvolution(Data); Data = starEvolution.Evolve(); this.Evolution = Data.EvolutionState; Visualize(); }
public StarData() { this.Mass = new FRange(); this.Radius = new FRange(); this.Color = new CRange(); this.Luminosity = new FRange(); this.EvolutionState = StarEvolutionState.Main; }
public void Create() { if (Class == StarClass.Random) { Data = StarData.GetData(); } else { Data = StarData.GetData(Class); } Data.Mutate(); float index = Random.Range(0.0f, 1f); Data.Luminosity.RandomValue(index, Mathf.Lerp); Data.Radius.RandomValue(index, Mathf.Lerp); Data.Color.RandomValue(index, Color.Lerp); Data.Mass.RandomValue(index, Mathf.Lerp); this.Evolution = Data.EvolutionState; this.Class = Data.StarClass; Visualize(); DestroyPlanets(); EcoZone = Star.EcosphereZone(this); }