rokojori_action_library/Runtime/Actions/OnPhysicsProcess.cs

25 lines
645 B
C#
Raw Normal View History

2024-08-04 09:08:12 +00:00
using Godot;
2026-05-22 12:25:02 +00:00
using Rokojori.Extensions;
namespace Rokojori;
2024-08-04 16:57:47 +00:00
2026-05-22 12:25:02 +00:00
[RokojoriActionCoreExport]
[Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/OnEvent.svg") ]
public partial class OnPhysicsProcess : Node
{
/** <summary for="field actions">Actions to execute</summary>*/
[Export]
public Action[] actions = new Action[ 0 ];
2024-08-04 09:08:12 +00:00
2026-05-22 12:25:02 +00:00
/** <summary for="field triggerDirectChildren">Whether to execute Action child nodes</summary>*/
[Export]
public bool triggerDirectChildren = true;
public override void _PhysicsProcess( double delta )
{
Action.TriggerAllActions( actions, this, triggerDirectChildren );
2024-08-04 09:08:12 +00:00
}
2026-05-22 12:25:02 +00:00
}