Hello! I have a good amount of experience with Java, Python, and a few other programming languages, so I might be getting my polymorphism mixed up while starting with Godot, but I have a question for the best way to check for a specific scene name.
I currently have a scene called "Enemy", which has a node structure. My plan was to have this be the basic template for all enemies in my game to be based around, similar to how java allows you to define a "Dog" class and then have subclasses such as "Beagle" and "Poodle". For contact damage, my Player scene has a signal that allows me to react to when an Area2D enters the collision hurtbox. I would like to write something like this:
This would be like capturing that a Poodle and Beagle are both dogs because they inherit "Dog", just that I would capture any enemy that hits the player. I just don't know if Godot supports this or, more so, how to implement this in Godot. Does anyone have any advice?
Ah, and the reason why I need to check in the first place is because I plan on having non-damaging entities as well, such as NPCs, signs, loading zones, etc., which will also interact with these zones:
The best way I've come up with for handling all of this behavior is to have three areas: the collision shape, the hurtbox, and the interactionBox.