Merge remote-tracking branch 'refs/remotes/origin/stage/molecular' into stage/molecular

This commit is contained in:
Martin committed 2026-03-15 16:12:17 +01:00
commit ff4d218ae9
1 file changed
+12
@@ -24,6 +24,7 @@ var isAlive: bool = true
@onready var invulnerable_cooldown_timer: Timer = $InvulnerableCooldownTimer
var hasiframes: bool = false # only used for iframe after collision for now
var target = Vector2.ZERO # either vector2 or Node2D
var updating_target: bool = false
func _ready() -> void:
var screen_size = get_viewport_rect().size
@@ -40,6 +41,17 @@ func _input(event):
# TODO: only does clicks/taps; accept mouse drags
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT and event.pressed:
target = get_global_mouse_position()
if event is InputEventMouseButton and event.button_index == MOUSE_BUTTON_LEFT:
if event.pressed:
# start tracking
target = get_global_mouse_position()
updating_target = true
else:
# stop tracking
updating_target = false
if updating_target and event is InputEventMouseMotion:
target = get_global_mouse_position()
func _physics_process(delta):
var pos
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.