26 lines
431 B
C#
26 lines
431 B
C#
using Godot;
|
|
|
|
using Rokojori.Extensions;
|
|
namespace Rokojori;
|
|
|
|
[Tool]
|
|
[GlobalClass, Icon("res://addons/rokojori_action_library/Icons/Action.svg")]
|
|
public partial class FollowBehavior:BehaviorSequence
|
|
{
|
|
[Export]
|
|
public BehaviorMovement movement;
|
|
|
|
[Export]
|
|
public Node3D target;
|
|
|
|
protected override void _OnTrigger()
|
|
{
|
|
if ( movement != null )
|
|
{
|
|
movement.Follow( target );
|
|
}
|
|
|
|
base._OnTrigger();
|
|
}
|
|
}
|