public void Create(Zone zone) { Data = PlanetData.GetData(zone); PlanetValues(); Visualize(); DestroySatellites(); }
public void Create() { if (Class == PlanetClass.Random) { Data = PlanetData.GetData(); } else { Data = PlanetData.GetData(Class); } PlanetValues(); Visualize(); DestroySatellites(); }
public void Create(float parentRadius) { PlanetClass satClass = PlanetClass.Random; int randClass = Random.Range(0, 3); if (randClass == 0) { satClass = PlanetClass.A; } if (randClass == 1) { satClass = PlanetClass.C; } if (randClass == 2) { satClass = PlanetClass.D; } Data = PlanetData.GetData(satClass); Data.Radius.From = 10000f; if (parentRadius >= 15000000) { Data.Radius.To = 5000000f; } else if (parentRadius >= 5000000) { Data.Radius.To = 2000000f; } else { Data.Radius.To = 700000f; } float index = Random.Range(0.0f, 1f); Data.Radius.RandomValue(index, Mathf.Lerp); index = Random.Range(0.0f, 1f); Data.Density.RandomValue(index, Mathf.Lerp); Visualize(); }