2024-05-04 08:26:16 +00:00
|
|
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
2024-05-12 17:03:20 +00:00
|
|
|
/** <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>
|
|
|
|
*/
|
|
|
|
|
2024-11-13 11:57:10 +00:00
|
|
|
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/RJActionList.svg") ]
|
2024-05-04 08:26:16 +00:00
|
|
|
public partial class ActionList : RJAction
|
2024-05-12 17:03:20 +00:00
|
|
|
{
|
|
|
|
|
|
|
|
/** <summary for="field actions">Actions to execute</summary>*/
|
2024-05-04 08:26:16 +00:00
|
|
|
[Export]
|
|
|
|
public RJAction[] actions;
|
2024-05-12 17:03:20 +00:00
|
|
|
|
|
|
|
/** <summary for="field triggerDirectChildren">Whether to execute RJAction child nodes</summary>*/
|
|
|
|
[Export]
|
2024-05-04 08:26:16 +00:00
|
|
|
public bool triggerDirectChildren = true;
|
|
|
|
|
2024-05-05 07:52:06 +00:00
|
|
|
public override void _OnTrigger()
|
2024-05-04 08:26:16 +00:00
|
|
|
{
|
2024-08-04 09:08:12 +00:00
|
|
|
Actions.TriggerAll( actions, this, triggerDirectChildren );
|
2024-05-04 08:26:16 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|