Changed UI sprites to use sprite in resource

This commit is contained in:
MaddoScientisto 2025-02-16 17:36:33 +01:00
commit f2482e4e38
10 changed files with 47 additions and 13 deletions

View file

@ -47,7 +47,15 @@ public partial class Selector : Node2D
if (Input.IsActionJustPressed("scan"))
{
SelectNext();
}
if (SelectedInteractable != null) {
this.Visible = true;
this.GlobalPosition = SelectedInteractable.GlobalPosition;
}
else
{
this.Visible = false;
}
}
@ -107,6 +115,7 @@ public partial class Selector : Node2D
public void UpdatePosition()
{
return;
if (SelectedInteractable != null)
{
this.Position = SelectedInteractable.Position;