using Godot; using System.Collections; using System.Collections.Generic; using Godot.Collections; namespace Rokojori { [GlobalClass] public partial class Interactor:Node3D, SensorInputHandler { [Export] public Pointer pointer; [Export] public Sensor button; public void _OnSensor( SensorEvent se ) { if ( pointer == null || pointer.pointable == null ) { return; } var interactable = Nodes.Find( pointer.pointable.GetParent() ); if ( interactable == null ) { return; } Action.Trigger( interactable.onInteraction ); } } }