so in my game I have areas that will damage whoever enters them (players, AI, ...)
I do use collision layers to make sure that only players and AI, and so on, are detected.
But I still want to make sure, that whatever entered the trigger actually has a damage method. (in case I forget to configure the layers)
So right now I am doing:
I was wondering if this is the best way to do this.
Especially, I wondered about the performance of
Another way of doing it would be:
is_in_group() is faster than checking
I would like to know what the best way of doing this might be, perhaps something else I haven't considered yet?