2d movement cs event par

Co-authored-by: Raul Santos <raulsntos@gmail.com>
This commit is contained in:
HubbleCommand
2024-08-26 13:33:38 +02:00
committed by GitHub
co-authored by Raul Santos
parent 59de1556d2
commit 8a868a4808
+2 -1
View File
@@ -254,7 +254,8 @@ on the screen will cause the player to move to the target location.
public override void _Input(InputEvent @event)
{
if (Input.IsActionPressed("click"))
// Use IsActionPressed to only accept single taps as input instead of mouse drags.
if (@event.IsActionPressed("click"))
{
_target = GetGlobalMousePosition();
}