This commit is contained in:
Page Asgardius 2024-06-15 14:21:13 -07:00
parent 4f6a5bc90c
commit 0f970b3d7a

View file

@ -48,14 +48,14 @@ func _ready():
# Called every frame. 'delta' is the elapsed time since the previous frame. # Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta): func _process(delta):
Global.xm = 0
Global.ym = 0
var velocity = Vector2.ZERO var velocity = Vector2.ZERO
if Global.exitgame: if Global.exitgame:
_exit() _exit()
#velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta #velocity = (Vector2.RIGHT.rotated(rotation) * -100 * Global.xm * delta)-Vector2.UP.rotated(rotation) * -100 * Global.ym * delta
func _input(event): func _input(event):
Global.xm = 0
Global.ym = 0
if Global.live == 1 && !Input.is_action_pressed("schar"): if Global.live == 1 && !Input.is_action_pressed("schar"):
if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2: if Input.get_joy_axis(0,JOY_AXIS_LEFT_X) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) > 0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_X) < -0.2 || Input.get_joy_axis(0,JOY_AXIS_LEFT_Y) < -0.2:
Global.xm = Input.get_joy_axis(0,JOY_AXIS_LEFT_X) Global.xm = Input.get_joy_axis(0,JOY_AXIS_LEFT_X)