Exemple #1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (text.HaveEnoughHealth(damage))
     {
         text.SpendHealth(damage);
     }
     else
     {
         //StartCoroutine(StopGame());
         GetComponent <AudioSource>().Play();
         FindObjectOfType <LevelController>().HandleLoseCondition();
         //  FindObjectOfType<Level>().LoadYouLose();
     }
     Destroy(collision.gameObject);
 }