gdquest-demos / godot-kickstarter-2019

Create your Own Games with Godot, the Free Game Engine: sources from the January Kickstarter project from GDQuest
MIT License
242 stars 269 forks source link

Shield blocking demo added #18

Closed guilhermehto closed 5 years ago

guilhermehto commented 5 years ago

image

The enemy can damage the player by touching it (like mario) or by calling a function in the Player for enemies that don't rely on collisions to damage him.

There are two ways the blocking works:

guilhermehto commented 5 years ago

I fixed most of the issues you pointed, left some comments on some though. I won't push as it's not done and I'll wait for your input on what to do next. One approach would be to remove the StaticBody from our shield and let is_shield_facing() handle everything.

NathanLovato commented 5 years ago

Answered your comments, you can go ahead :)

NathanLovato commented 5 years ago

If you have the shield facing away from the enemy or you're in contact with the enemy and you remove the shield, you won't take any damage.

guilhermehto commented 5 years ago

Done :)