contrôles: ajouter le support de la manette
La manette de xbox peut contrôler la princesse. Croix directionnelle et joystick gauche pour les déplacements A pour sauter. La suite après!
This commit is contained in:
@@ -159,8 +159,13 @@ func _physics_process(delta: float) -> void:
|
||||
)
|
||||
|
||||
pressing_wall = is_on_wall_only() and not is_zero_approx(axis)
|
||||
if axis != 0:
|
||||
direction = axis
|
||||
|
||||
if not is_zero_approx(axis):
|
||||
if axis < 0:
|
||||
direction = -1
|
||||
else:
|
||||
direction = 1
|
||||
|
||||
|
||||
velocity.x = walk(direction)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user