public void Crash() { if (invincibility.invincible || lives <= 0) { return; } lives--; LifeCounter.UpdateCounter(lives); if (lives == 0) { Death(); } else { invincibility.Play(); } }
void Start() { LifeCounter.UpdateCounter(lives); }