Hey, guys, I really don't get how to use a body_enter function, please explain.
I got two nodes Player and Enemy and they both are KinematicBodies2D.
Enemy node has got an Area2D node in it with script like this:
connect("body_enter", self, "_on_enemy_body_enter")
if (body.get_name == "Player")
I also have tried to add an Area2D to Player node and to change areas to RigidBodies2D but nothing seems to be working at all.
What am I doing wrong?