Ejemplo n.º 1
0
 private void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.layer == 8 || collision.gameObject.layer == 9)
     {
         TankHealth targetHealth = collision.GetComponent <TankHealth>();
         targetHealth.AddBlood(bloodAdd);
         Destroy(gameObject);
     }
 }