using Godot; namespace Rokojori { [Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ] public partial class OnReady : Node { /** Actions to execute*/ [Export] public Action[] actions = new Action[ 0 ]; /** Whether to execute Action child nodes*/ [Export] public bool triggerDirectChildren = true; [Export] public bool triggerInsideEditor = false; public override void _Ready() { if ( Engine.IsEditorHint() && ! triggerInsideEditor ) { return; } Action.TriggerAll( actions, this, triggerDirectChildren ); } } }