Replies: 2 comments
-
Yes indeed, we need to discuss how to design the game entities from now on to support more mechanics. Other ideas:
In general, I think this means using composition over inheritence, and coming up with a good design pattern that isn't too magical. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Right now, the only entity that can be attacked are projectiles. This is constrained both by code and by the collision mask of the
PlayerFighting/HitBox
inplayer.tscn
:threadbare/scenes/game_elements/characters/player/components/player_fighting.gd
Lines 37 to 38 in 5a51c49
I think a good strategy could be to do the same thing we are doing with the
InteractZone
+InteractArea
:HitBox
+HurtBox
.HitBox
used by player attacks andHurtBox
being an area that emits a signal when activated by aHitBox
. Projectiles could be reimplemented using something like that.This has a limitation as proposed: it is only possible to be applied to player attacks that hit everything that is attackable. It doesn't attempt to handle other things that could also attack (like enemies or projectiles).
Beta Was this translation helpful? Give feedback.
All reactions