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.
22 lines
585 B
22 lines
585 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 Detected()
|
|
{
|
|
GD.Print("Detected " + interactionArea2D.GetParent().Name);
|
|
interactionArea2D.IsSelectedByDetector = true;
|
|
}
|
|
|
|
public void NoLongerDetected()
|
|
{
|
|
interactionArea2D.IsSelectedByDetector = false;
|
|
}
|
|
} |