DemoProductions / shmup

3 stars 2 forks source link

implement hp damage #34

Closed flip40 closed 8 years ago

flip40 commented 8 years ago

have bullet objects damage what they come in contact with then destroy self.

needs a check to make sure whatever it collides with can actually be damaged, i.e.:

hp = other.GetComponent<Health>();
if (hp) damage;

The actual line you commented out in the bullet script for onTriggerEnter just about does it, other than checking if it actually found a Health component on the other object.