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.
25 lines
732 B
25 lines
732 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())
|
|
{
|
|
GD.Print("InteractionArea: Selected.");
|
|
interactionArea2D.HighlightInteractable();
|
|
}
|
|
else
|
|
{
|
|
GD.Print("InteractionArea: Not Selected.");
|
|
interactionArea2D.ResetHighlight();
|
|
}
|
|
}
|
|
} |