🚧 WIP detection works now

This commit is contained in:
2025-12-12 13:46:32 +01:00
parent 7ffbb8e68d
commit 9e0e87ef17
13 changed files with 105 additions and 99 deletions
@@ -9,14 +9,16 @@ public partial class DetectableInteractionArea : Area2D
{
[Export] public InteractionArea2D interactionArea2D;
public void Detected()
public void InteractionAreaSelectionChanged(Variant instanceID)
{
GD.Print("Detected " + interactionArea2D.GetParent().Name);
interactionArea2D.IsSelectedByDetector = true;
}
public void NoLongerDetected()
{
interactionArea2D.IsSelectedByDetector = false;
if (instanceID.AsString() == GetInstanceId().ToString())
{
interactionArea2D.HighlightInteractable();
}
else
{
interactionArea2D.ResetHighlight();
}
}
}