29 lines
736 B
C#
29 lines
736 B
C#
![]() |
using BehaviorDesigner.Runtime.Tasks;
|
||
|
using BlueWater.Npcs.Crews;
|
||
|
|
||
|
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;
|
||
|
}
|
||
|
}
|
||
|
}
|