void Update() { if (healthManager.IsAllowedToBurn(transform.position)) { StartCoroutine(healthManager.Burn()); StartCoroutine(BurnAnimate()); StartCoroutine(ShakeCamera()); } if (healthManager.IsDead) { SceneManager.LoadScene("LevelSelect", LoadSceneMode.Single); } }
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); } }