2024-01-15 06:35:58 +00:00
|
|
|
using UnityEngine;
|
|
|
|
|
2024-01-02 08:17:10 +00:00
|
|
|
// ReSharper disable once CheckNamespace
|
|
|
|
namespace BlueWaterProject
|
|
|
|
{
|
|
|
|
public class WalkOutSate : INpcState
|
|
|
|
{
|
|
|
|
private TycoonNpc npc;
|
2024-01-15 06:35:58 +00:00
|
|
|
private Transform walkOutPoint;
|
2024-01-02 08:17:10 +00:00
|
|
|
|
|
|
|
public WalkOutSate(TycoonNpc npc)
|
|
|
|
{
|
|
|
|
this.npc = npc;
|
2024-01-15 06:35:58 +00:00
|
|
|
walkOutPoint = npc.MapInfo.WalkOutPoint;
|
2024-01-02 08:17:10 +00:00
|
|
|
}
|
|
|
|
public void OnEnter(NpcStateMachine npcStateMachine)
|
|
|
|
{
|
2024-01-15 06:35:58 +00:00
|
|
|
npc.Agent.SetDestination(walkOutPoint.position);
|
2024-01-02 08:17:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public void OnUpdate(NpcStateMachine npcStateMachine)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void OnExit(NpcStateMachine npcStateMachine)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|