Fix ControlUtils singleton not registering properly

This commit is contained in:
Nathan Lovato 2019-05-19 22:58:14 +09:00
parent ae54ee9139
commit a67f0d8424
2 changed files with 2 additions and 1 deletions

View file

@ -20,7 +20,7 @@ func update_position(velocity:Vector2) -> void:
_camera.position = distance_ratio * mouse_position.normalized() * offset
Settings.GAMEPAD:
var joystick_direction: = get_aim_joystick_direction()
var joystick_direction: = ControlUtils.get_aim_joystick_direction()
if Input.is_action_pressed("move_right") or Input.is_action_pressed("move_left"):
_camera.position.x = sign(velocity.x) * offset.x
_camera.position.y = joystick_direction.y * offset.y

View file

@ -1,4 +1,5 @@
"""Global utility methods to extend what's available from the Input singleton"""
extends Node
static func get_aim_joystick_direction() -> Vector2: