26 lines
571 B
C#
26 lines
571 B
C#
using BehaviorDesigner.Runtime.Tasks;
|
|
using BlueWater.Npcs.Crews;
|
|
|
|
namespace BlueWater.BehaviorTrees.Actions
|
|
{
|
|
[TaskCategory("Custom/Npc/Crew")]
|
|
public class CompleteMission : Action
|
|
{
|
|
private Crew _crew;
|
|
|
|
public override void OnAwake()
|
|
{
|
|
_crew = GetComponent<Crew>();
|
|
}
|
|
|
|
public override TaskStatus OnUpdate()
|
|
{
|
|
if (_crew.CrewInteraction == null)
|
|
{
|
|
return TaskStatus.Success;
|
|
}
|
|
|
|
return TaskStatus.Running;
|
|
}
|
|
}
|
|
} |