Esempio n. 1
0
 void Update()
 {
     if (healthManager.IsAllowedToBurn(transform.position))
     {
         StartCoroutine(healthManager.Burn());
         StartCoroutine(BurnAnimate());
         StartCoroutine(ShakeCamera());
     }
     if (healthManager.IsDead)
     {
         SceneManager.LoadScene("LevelSelect", LoadSceneMode.Single);
     }
 }
Esempio n. 2
0
 void Update()
 {
     if (healthManager.IsAllowedToBurn(transform.position))
     {
         StartCoroutine(healthManager.Burn());
         PlayHurtSound();
     }
     if (healthManager.IsDead)
     {
         Debug.Log("Koala is dead");
         GameObject.Find("Canvas").GetComponent <Score>().AnimalDied();
         Destroy(gameObject);
     }
 }