private void OnCollisionEnter(Collision collision) { if (collision.gameObject.tag == "Player") { death.restartLevel(boom, animator, wait); } }
private void Update() { if (target.transform.position.y <= deathPos.y) { death.restartLevel(boom, animator, wait); this.enabled = false; } }