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

23 lines
562 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]
2024-08-04 16:57:47 +00:00
public RJAction[] actions;
/** <summary for="field triggerDirectChildren">Whether to execute RJAction child nodes</summary>*/
[Export]
public bool triggerDirectChildren = true;
2024-05-05 07:52:06 +00:00
public override void _Ready()
{
2024-08-04 16:57:47 +00:00
Actions.TriggerAll( actions, this, triggerDirectChildren );
2024-05-05 07:52:06 +00:00
}
}
}