You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Babushka/scripts/CSharp/Common/CharacterControls/DetectableInteractionArea.cs

24 lines
625 B

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();
}
}
}