added controller support and attack
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user