About 'Create Damage Dealer Class'!

In this video (objectives)…

  1. Create a class called Damage Dealer that can be placed on whatever game objects we want to use to inflict damage.

  2. Create an enemy class that can handle enemy's health.

  3. Shoot a laser that harms enemy.

After watching (learning outcomes)…

Create a class responsible for dealing damage to objects which have health.

(Unique Video Reference: 19_LD_CUD)

We would love to know…

  • What you found good about this lecture?
  • What we could do better?

Remember that you can reply to this topic, or create a new topic. The easiest way to create a new topic is to follow the link in Resources. That way the topic will…

  • Be in the correct forum (for the course).
  • Be in the right sub-forum (for the section)
  • Have the correct lecture tag.

Enjoy your stay in our thriving community!

In case anyone is wanting colliders for their enemy ships that fit the body… It’s one of each type of sprite I have sitting in my project at the moment with fitted poly colliders around them. If you need the other colors, just duplicate the prefab and drop the .png file for the appropriate color into the Sprite Renderer component. I’ve removed any scripts and children I had associated with them, so you’ll have to add your own.

EDIT: These are the sprites from the Kenney’s asset pack they are using for the lessons. I’m not using trigger colliders, you’ll need to check the Is Trigger box if you are.

SpritesWithPolyColliders.zip (88.3 KB)


I ran into an issue with this video where my ships were being destroyed by their own laser! I worked out this was because I duplicated the Player Laser and the BoxCollider2D was the culprit. Removing that everything was as per Rick’s video but I found another issue in that workaround: You can’t simply use the same Shredder object at the bottom of the screen to destroy the enemy lasers!

I suspect this’ll get dealt with in future videos though, perhaps by using Tags?

Hi Colton,

I was thinking of doing the same thing, but, looks like you beat me to it ages ago.
Thank you for your hard work. It’s great to be part of such a helpful community. :grin:


Privacy & Terms