added controller support and attack

This commit is contained in:
2025-06-25 21:47:22 -05:00
parent 60432795f2
commit 36cde498e0
8 changed files with 103 additions and 20 deletions

View File

@@ -7,13 +7,4 @@ func Physics_Update(delta):
body_look_at_mouse()
apply_gravity(delta)
respawn_on_fall(delta)
func dodge_roll():
if character.is_on_floor():
if character.stamina > character.DODGE_STAMINA_COST:
if Input.is_action_just_pressed("dodge"):
var dodge_direction = Input.get_vector("move_left", "move_right", "move_forward", "move_backward")
if dodge_direction:
character.stamina -= character.DODGE_STAMINA_COST
character.dodge_direction = dodge_direction
Transitioned.emit(self,"dodge roll")
attack()