35 lines
693 B
C#
35 lines
693 B
C#
![]() |
using System;
|
||
|
using UnityEngine.AI;
|
||
|
|
||
|
namespace BlueWaterProject
|
||
|
{
|
||
|
public class InteractionState : INpcState
|
||
|
{
|
||
|
private NavMeshAgent agent;
|
||
|
|
||
|
public InteractionState(NavMeshAgent agent)
|
||
|
{
|
||
|
this.agent = agent;
|
||
|
}
|
||
|
|
||
|
public void OnEnter(NpcStateMachine npcStateMachine)
|
||
|
{
|
||
|
agent.isStopped = true;
|
||
|
}
|
||
|
|
||
|
public void OnUpdate(NpcStateMachine npcStateMachine)
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
public void OnExit(NpcStateMachine npcStateMachine)
|
||
|
{
|
||
|
agent.isStopped = false;
|
||
|
}
|
||
|
|
||
|
public INpcState Clone()
|
||
|
{
|
||
|
return null;
|
||
|
}
|
||
|
}
|
||
|
}
|