27 lines
735 B
C#
27 lines
735 B
C#
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 SetTableSeatPositionAndDirection : Action
|
|
{
|
|
private Customer _customer;
|
|
|
|
public override void OnAwake()
|
|
{
|
|
_customer = GetComponent<Customer>();
|
|
}
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
_customer.SetTableSeatPositionAndDirection();
|
|
_customer.CurrentTableSeat.OccupySeat();
|
|
_customer.CurrentTableSeat.UnreserveSeat();
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
} |