🚧 WIP: trying to rework the detection system (it fails)
This commit is contained in:
@@ -7,4 +7,16 @@ namespace Babushka.scripts.CSharp.Common.CharacterControls;
|
||||
/// </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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user