CapersProject/Assets/02.Scripts/BlueWater/BehaviorTree/Npc/Customer/Action/CheckOut.cs
2025-02-10 11:13:46 +09:00

27 lines
669 B
C#

using System;
using BehaviorDesigner.Runtime.Tasks;
using DDD.Npcs.Customers;
using Action = BehaviorDesigner.Runtime.Tasks.Action;
namespace DDD.BehaviorTrees.Actions
{
[TaskCategory("Custom/Npc/Customer")]
[Serializable]
public class CheckOut : Action
{
private Customer _customer;
public override void OnAwake()
{
_customer = GetComponent<Customer>();
}
public override TaskStatus OnUpdate()
{
if (!_customer.AIMovement.HasReachedDestination()) return TaskStatus.Running;
_customer.CheckOut();
return TaskStatus.Success;
}
}
}