31 lines
738 B
C#
31 lines
738 B
C#
|
|
using Godot;
|
|
|
|
|
|
namespace Rokojori
|
|
{
|
|
[GlobalClass, Tool, Icon("res://addons/rokojori_action_library/Icons/RJOnEvent.svg") ]
|
|
public partial class OnProcess : Node
|
|
{
|
|
/** <summary for="field actions">Actions to execute</summary>*/
|
|
[Export]
|
|
public RJAction[] actions;
|
|
|
|
/** <summary for="field triggerDirectChildren">Whether to execute RJAction child nodes</summary>*/
|
|
[Export]
|
|
public bool triggerDirectChildren = true;
|
|
|
|
[Export]
|
|
public bool executeInEditor = false;
|
|
|
|
public override void _Process( double delta )
|
|
{
|
|
if ( Engine.IsEditorHint() && ! executeInEditor )
|
|
{
|
|
return;
|
|
}
|
|
|
|
Actions.TriggerAll( actions, this, triggerDirectChildren );
|
|
}
|
|
}
|
|
} |