Handling hitboxes
- by TheBroodian
So I have an issue that I'm laughing at myself about, because it really seems like it should be something that I should be able to figure out pretty quickly.
I am designing a 2D action platformer; I have a playable character, and a dummy 'punching bag' character for testing purposes that I've created. I've just gotten enough of both of them done that I can start prototyping and testing them in runtime.
Then I realized- neither of them have references of each other (intentionally so), so how do I check for hitboxes stored within my playable character from my dummy character?
Long story short, how do I make my dummy know when he's been punched by my hero?