+ ItemTable excel, json, so 수정 + 손님 추가 -> 빈 자리 찾기 -> 음료 주문 -> 퇴장 구현 + 일부 BehaviorTree Action 변경
27 lines
688 B
C#
27 lines
688 B
C#
using System;
|
|
using BehaviorDesigner.Runtime.Tasks;
|
|
using BlueWater.Enemies;
|
|
using Action = BehaviorDesigner.Runtime.Tasks.Action;
|
|
|
|
namespace BlueWater.BehaviorTrees.Actions
|
|
{
|
|
[TaskCategory("Custom")]
|
|
[Serializable]
|
|
public class HasReachedDestination : Action
|
|
{
|
|
private AiMovement _aiMovement;
|
|
|
|
public override void OnAwake()
|
|
{
|
|
_aiMovement = transform.GetComponent<AiMovement>();
|
|
}
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
if (!_aiMovement.HasReachedDestination()) return TaskStatus.Running;
|
|
|
|
_aiMovement.StopMove();
|
|
return TaskStatus.Success;
|
|
}
|
|
}
|
|
} |