ssbmDao / SimpleFightingGame

A simplistic fighting game
MIT License
0 stars 0 forks source link

Added hurt/hitboxes. Facing now determine in new Main_Game.gd. #3

Open godofgrunts opened 3 years ago

godofgrunts commented 3 years ago

Added hurtboxes and hitboxes for the character and the attacks. Right now, they just print a message when they connect, but I'm thinking sending signals to Main_Game.gd to handle that logic.

Left debug mode on so you can see the hitboxes, You can disable by going to Debug -> Visible Collision Shapes

Instead of doing flip_h on the sprites, I'm now doing scale.x = -1. I'm doing this because I manually cleaned up the animations so they look correct, but doing so makes them completely messed up when you flip the sprite. However, doing scale.x = -1 then caused the RayCast2Ds to also flip, so my previous detection method no longer worked.

The new code for determining facing is in Main_Game.gd as I figured the characters themselves don't actually care about which way they are facing so it's probably better to handle that elsewhere.