private void OnTriggerEnter2D(Collider2D collision) { restart.Dead(); deadAudio.Play(); player.SetActive(false); dead.SetActive(true); }
public void Damage(int damage) { lifes -= damage; if (lifes <= 0) { lifes = 0; manager.Dead(); } }
void OnTriggerEnter2D(Collider2D other) { if (!isDead && (other.tag == "Obstacle" || other.tag == "Limit")) { Die(); deathSound.Play(); theGameManager.Dead(); } }