Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.tag == "DeathZone")
     {
         manager.LifesHandler();
         if (manager.lives > 0)
         {
             manager.AddScore(-50);
             InitializeBall();
         }
         else
         {
             Destroy(gameObject);
         }
     }
 }