2025-10-22 19:30:33 +02:00
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
|
|
|
|
|
2025-10-24 15:13:35 +02:00
|
|
|
/// <summary>
|
|
|
|
|
/// Used for identifying <see cref="InteractionArea2D"/> scenes when listening for area overlaps.
|
|
|
|
|
/// </summary>
|
2025-10-22 19:30:33 +02:00
|
|
|
public partial class DetectableInteractionArea : Area2D
|
|
|
|
|
{
|
2025-12-09 17:51:00 +01:00
|
|
|
[Export] public InteractionArea2D interactionArea2D;
|
2025-12-12 13:46:32 +01:00
|
|
|
|
|
|
|
|
public void InteractionAreaSelectionChanged(Variant instanceID)
|
2025-12-09 17:51:00 +01:00
|
|
|
{
|
2025-12-12 13:46:32 +01:00
|
|
|
if (instanceID.AsString() == GetInstanceId().ToString())
|
|
|
|
|
{
|
|
|
|
|
interactionArea2D.HighlightInteractable();
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
interactionArea2D.ResetHighlight();
|
|
|
|
|
}
|
2025-12-09 17:51:00 +01:00
|
|
|
}
|
2025-10-22 19:30:33 +02:00
|
|
|
}
|