rj-action-library/Runtime/Actions/OnReady.cs

23 lines
557 B
C#
Raw Normal View History

2024-05-05 07:52:06 +00:00
using Godot;
namespace Rokojori
{
2024-11-13 11:57:10 +00:00
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/RJOnEvent.svg") ]
2024-05-05 07:52:06 +00:00
public partial class OnReady : Node
{
2024-08-04 16:57:47 +00:00
/** <summary for="field actions">Actions to execute</summary>*/
2024-05-05 07:52:06 +00:00
[Export]
2025-01-08 18:46:17 +00:00
public Action[] actions;
2024-08-04 16:57:47 +00:00
2025-01-08 18:46:17 +00:00
/** <summary for="field triggerDirectChildren">Whether to execute Action child nodes</summary>*/
2024-08-04 16:57:47 +00:00
[Export]
public bool triggerDirectChildren = true;
2024-05-05 07:52:06 +00:00
public override void _Ready()
{
2025-01-08 18:46:17 +00:00
Action.TriggerAll( actions, this, triggerDirectChildren );
2024-05-05 07:52:06 +00:00
}
}
}