🚧 WIP detection works now
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user