a game about throwing hammers made for the github game off
Diffstat (limited to 'ui/components/aim/aim.gd')
-rw-r--r--ui/components/aim/aim.gd4
1 files changed, 1 insertions, 3 deletions
diff --git a/ui/components/aim/aim.gd b/ui/components/aim/aim.gd
index 41460a2..f822182 100644
--- a/ui/components/aim/aim.gd
+++ b/ui/components/aim/aim.gd
@@ -28,14 +28,12 @@ func _process(delta: float) -> void:
return
if v.is_zero_approx():
v.x = Globals.player.sprite.scale.x # default to current facing direction
- elif v.y == Vector2.DOWN.y and Util.is_in_range(v.x, -0.1, 0.1) and Globals.player.is_on_floor():
+ elif Utils.is_in_range(v.y, 0.9, 1) and Util.is_in_range(v.x, -0.1, 0.1) and Globals.player.is_on_floor():
cancel_left_time -= delta
if cancel_left_time < 0:
cancel_left_time = cancel_time
cancel.emit()
return
- else:
- cancel_left_time = cancel_time
var angle := v.angle()
current_rotation = angle
arrow.rotation = angle