rj-action-library/Runtime/Actions/Node/SetNodeStateSpecific.cs

27 lines
480 B
C#
Raw Normal View History

2025-07-22 14:08:22 +00:00
using Godot;
namespace Rokojori
{
2025-11-26 14:23:59 +00:00
[Tool][GlobalClass, Icon("res://addons/rokojori_action_library/Icons/SetNodeState.svg")]
2025-07-22 14:08:22 +00:00
public partial class SetNodeStateSpecific : Action
{
[Export]
public Node target;
[Export]
public NodeStateConfiguration configuration;
protected override void _OnTrigger()
{
2025-10-24 11:38:51 +00:00
CallDeferred( "SetNodeState" );
}
void SetNodeState()
{
2025-07-22 14:08:22 +00:00
NodeState.Configure( target, configuration );
}
}
}