2024-08-04 09:08:12 +00:00
|
|
|
|
|
|
|
using Godot;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Rokojori
|
|
|
|
{
|
|
|
|
[GlobalClass, Icon("res://Scripts/Rokojori/Rokojori-Action-Library/Icons/RJOnEvent.svg") ]
|
|
|
|
public partial class OnPhysicsProcess : Node
|
|
|
|
{
|
2024-08-04 16:57:47 +00:00
|
|
|
/** <summary for="field actions">Actions to execute</summary>*/
|
2024-08-04 09:08:12 +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-08-04 09:08:12 +00:00
|
|
|
|
|
|
|
public override void _PhysicsProcess( double delta )
|
|
|
|
{
|
2024-08-04 16:57:47 +00:00
|
|
|
Actions.TriggerAll( actions, this, triggerDirectChildren );
|
2024-08-04 09:08:12 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|