CapersProject/Assets/02.Scripts/BehaviorTree/Npc/Customer/Action/MoveMoneyCounterPosition.cs

26 lines
615 B
C#
Raw Normal View History

2024-11-11 02:02:24 +00:00
using System;
using BehaviorDesigner.Runtime.Tasks;
using BlueWater.Npcs.Customers;
using Action = BehaviorDesigner.Runtime.Tasks.Action;
namespace BlueWater.BehaviorTrees.Actions
{
[TaskCategory("Custom/Npc/Customer")]
[Serializable]
public class MoveMoneyCounterPosition : Action
{
private Customer _customer;
public override void OnAwake()
{
_customer = GetComponent<Customer>();
}
public override TaskStatus OnUpdate()
{
_customer.MoveMoneyCounter();
return TaskStatus.Success;
}
}
}