Beispiel #1
0
    public void Crash()
    {
        if (invincibility.invincible || lives <= 0)
        {
            return;
        }

        lives--;
        LifeCounter.UpdateCounter(lives);
        if (lives == 0)
        {
            Death();
        }
        else
        {
            invincibility.Play();
        }
    }
Beispiel #2
0
 void Start()
 {
     LifeCounter.UpdateCounter(lives);
 }