void changePlanetType(Dropdown change) { PlanetInfo.setInfo(PlanetModifiers.Planets[change.options[change.value].text]); scaleSlider.value = PlanetInfo.info.planetScale; speedSlider.value = PlanetInfo.info.rotationSpeed; pt.Regen(); pb.resetBehaviour(); }
// Start is called before the first frame update void Start() { //set planet to earthlike if null if (PlanetInfo.info.landColors == null) { PlanetModifiers.init(); var first = PlanetModifiers.Planets.First(); PlanetInfo.setInfo(PlanetModifiers.Planets[first.Key]); } waterIndex = Random.Range(0, PlanetInfo.info.waterColors.Count); landIndex = Random.Range(0, PlanetInfo.info.landColors.Count); mountainIndex = Random.Range(0, PlanetInfo.info.mountainColors.Count); if (WorldProperties.planetTexture == null) { WorldProperties.planetTexture = GenerateTexture(); } }