23 lines
624 B
C#
23 lines
624 B
C#
using Godot;
|
|
|
|
namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
|
|
|
/// <summary>
|
|
/// Used for identifying <see cref="InteractionArea2D"/> scenes when listening for area overlaps.
|
|
/// </summary>
|
|
public partial class DetectableInteractionArea : Area2D
|
|
{
|
|
[Export] public InteractionArea2D interactionArea2D;
|
|
|
|
public void InteractionAreaSelectionChanged(Variant instanceID)
|
|
{
|
|
if (instanceID.AsString() == GetInstanceId().ToString())
|
|
{
|
|
interactionArea2D.HighlightInteractable();
|
|
}
|
|
else
|
|
{
|
|
interactionArea2D.ResetHighlight();
|
|
}
|
|
}
|
|
} |