Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 private void RunPlanet()
 {
     planet = PlanetModel.GeneratePlanet(PlanetDifficulty.BabyMode);
     result = planet.FightMe(DNA);
 }