public static PlanetModel GeneratePlanet(PlanetDifficulty pd) { PlanetModel pm = new PlanetModel(); pm.challenges = new List <PlanetChallenge>(); int challenge = (int)pd; while (challenge > 0) { int random = UnityEngine.Random.Range(1, challenge + 1); challenge -= random; pm.challenges.Add(new PlanetChallenge(random)); } return(pm); }
private void RunPlanet() { planet = PlanetModel.GeneratePlanet(PlanetDifficulty.BabyMode); result = planet.FightMe(DNA); }