Example #1
0
 private void RescueFarmAnimals(GameObject animal)
 {
     if (animal.GetComponent <FarmAnimal>())
     {
         sound.clip = snatchAnimalSound;
         sound.Play();
         GameObject parent = animal.transform.parent.gameObject;
         Destroy(parent);
         npc.RemovePositionFromGrid(parent);
         generator.SetAnimalCount();
         animalCountText.text = generator.GetAnimalCount().ToString();
         Debug.Log(generator.GetAnimalCount());
         Debug.Log(FarmAnimal.animalCount);
         Debug.Log("");
     }
 }
Example #2
0
    public void calculateScore() {
        score += (TimerLevel.timer * pcg.GetAnimalCount()) + Projectile.foxCount;
        SetHighScore(score);
		scoreSummary.text = score.ToString();
		levelSummary.text = level.GetLevel().ToString();
		highScoreSummary.text = PlayerPrefsManager.GetHighestScore().ToString();
        level_number = level.GetLevel();
	}