CapersProject/Assets/02.Scripts/BehaviorTree/Npc/Crew/Action/CompleteCleaning.cs

26 lines
571 B
C#
Raw Normal View History

2024-10-14 11:13:08 +00:00
using BehaviorDesigner.Runtime.Tasks;
using BlueWater.Npcs.Crews;
namespace BlueWater.BehaviorTrees.Actions
{
2024-10-15 18:01:16 +00:00
[TaskCategory("Custom/Npc/Crew")]
public class CompleteMission : Action
2024-10-14 11:13:08 +00:00
{
2024-10-15 18:01:16 +00:00
private Crew _crew;
2024-10-14 11:13:08 +00:00
public override void OnAwake()
{
2024-10-15 18:01:16 +00:00
_crew = GetComponent<Crew>();
2024-10-14 11:13:08 +00:00
}
public override TaskStatus OnUpdate()
{
2024-10-15 18:01:16 +00:00
if (_crew.CrewInteraction == null)
2024-10-14 11:13:08 +00:00
{
return TaskStatus.Success;
}
return TaskStatus.Running;
}
}
}