Alternate method of detecting what hit the enemy

I made use of tags (building off the work we did in Block Breaker with the whole “breakable” tag) to identify what triggered an enemy collider. My laser bolts are all tagged with “PlayerShot”. Code below:

Given that I need to grab Projectile anyway it’s not really any cleaner than the method presented in the lecture but I thought I would share anyway…

3 Likes

Always good to learn multiple ways of doing things

2 Likes

Privacy & Terms