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