public void SetDificultyByScore(int score)
 {
     if (score < 40)
     {
         Dificulty = Dificult.EASY;
     }
     else if (score < 85)
     {
         Dificulty = Dificult.MEDIUM;
     }
     else
     {
         Dificulty = Dificult.HARD;
     }
 }
    public void ChangeDificult(Dificult dificult)
    {
        switch (dificult)
        {
        case Dificult.Level1:
            timerOfRespawn = 5;
            timer = 0;
            spawnMaxNumber = 1;
            catsLimit = cats.Length/5;
            break;
        case Dificult.Level2:
            timerOfRespawn = 4;
            timer = 0;
            spawnMaxNumber = 2;
            catsLimit = cats.Length/4;
         		break;
        case Dificult.Level3:
            timerOfRespawn = 3;
            timer = 0;
            spawnMaxNumber = 3;
            catsLimit = cats.Length/3;
            break;
        case Dificult.Level4:
            timerOfRespawn = 2;
            timer = 0;
            spawnMaxNumber = 4;
            catsLimit = cats.Length/2;
            break;
        case Dificult.Level5:
            timerOfRespawn = 1;
            timer = 0;
            spawnMaxNumber = 5;
            catsLimit = cats.Length;
            break;
        default:
            break;
        }

          	CatManager.dificult = dificult;
    }
 private void Awake()
 {
     Dificulty      = Dificult.EASY;
     waitingToStart = true;
 }
Exemple #4
0
 private void Awake()
 {
     Dificulty      = Dificult.EASY;
     waitingToStart = true;
     missions       = Data.Instance.missions;
 }