2024-10-20 17:21:39 +00:00
|
|
|
using BehaviorDesigner.Runtime.Tasks;
|
2024-10-22 12:41:31 +00:00
|
|
|
using BlueWater.Npcs.Crews.Bartender;
|
2024-10-20 17:21:39 +00:00
|
|
|
|
|
|
|
namespace BlueWater.BehaviorTrees.Actions
|
|
|
|
{
|
|
|
|
[TaskCategory("Custom/Npc/Crew/BartenderCrew")]
|
|
|
|
public class MakingCocktail : Action
|
|
|
|
{
|
|
|
|
private BartenderCrew _bartenderCrew;
|
|
|
|
|
|
|
|
public override void OnAwake()
|
|
|
|
{
|
|
|
|
_bartenderCrew = GetComponent<BartenderCrew>();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override void OnStart()
|
|
|
|
{
|
|
|
|
_bartenderCrew.MakingCocktail();
|
|
|
|
}
|
|
|
|
|
|
|
|
public override TaskStatus OnUpdate()
|
|
|
|
{
|
|
|
|
if (!_bartenderCrew.BalloonUi.IsWaitTimeOver()) return TaskStatus.Running;
|
|
|
|
|
|
|
|
_bartenderCrew.CompletedMakingCocktail();
|
|
|
|
return TaskStatus.Success;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|