15 lines
373 B
GDScript
15 lines
373 B
GDScript
extends Node2D
|
|
@export var player: CharacterBody2D
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
%mouse_finder.position=get_global_mouse_position()
|
|
|
|
|
|
func _on_control_gui_input(event: InputEvent) -> void:
|
|
if event.is_action_pressed("mouse_right"):
|
|
if player:
|
|
player.sent_message("move",player.get_global_mouse_position())
|
|
pass
|
|
|
|
pass # Replace with function body.
|