mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 10:35:34 +00:00
Interactable fix
This commit is contained in:
parent
6de3d8a660
commit
295d32e66d
2 changed files with 11 additions and 2 deletions
|
|
@ -44,10 +44,17 @@ public partial class Selector : Node2D
|
|||
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
if (Input.IsActionPressed("scan"))
|
||||
if (Input.IsActionJustPressed("scan"))
|
||||
{
|
||||
_selectedInteractable += 1;
|
||||
if (_selectedInteractable >= _interactables.Count)
|
||||
{
|
||||
_selectedInteractable = 0;
|
||||
}
|
||||
|
||||
SelectedInteractable = _interactables[_selectedInteractable];
|
||||
UpdatePosition();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue