39 lines
985 B
C#
39 lines
985 B
C#
|
|
using Godot;
|
|
|
|
|
|
namespace Rokojori
|
|
{
|
|
/** <summary for="class ActionList">
|
|
|
|
<title>
|
|
Executes multiple actions (RJAction) at once.
|
|
</title>
|
|
|
|
<description>
|
|
The ActionList, which is an RJAction itself, executes all actions stored in the member 'actions' and also child nodes
|
|
that extend RJAction, when 'triggerDirectChildren' is checked.
|
|
|
|
</description>
|
|
|
|
</summary>
|
|
*/
|
|
|
|
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/RJActionList.svg") ]
|
|
public partial class ActionList : RJAction
|
|
{
|
|
|
|
/** <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;
|
|
|
|
public override void _OnTrigger()
|
|
{
|
|
Actions.TriggerAll( actions, this, triggerDirectChildren );
|
|
}
|
|
}
|
|
} |