2023-10-30 15:45:05 +00:00
|
|
|
using System;
|
|
|
|
using BlueWaterProject.Type;
|
|
|
|
|
|
|
|
namespace BlueWaterProject
|
|
|
|
{
|
|
|
|
public class MotionSickState : INpcState
|
|
|
|
{
|
2023-11-01 09:25:09 +00:00
|
|
|
public event Action OnEnterAction;
|
2023-10-30 15:45:05 +00:00
|
|
|
|
|
|
|
public void OnEnter(NpcStateMachine npcStateMachine)
|
|
|
|
{
|
|
|
|
npcStateMachine.InstantiateObject(DataManager.Inst.vomit, npcStateMachine.transform.position);
|
2023-11-01 09:25:09 +00:00
|
|
|
OnEnterAction?.Invoke();
|
2023-10-30 15:45:05 +00:00
|
|
|
npcStateMachine.RestorePreviousState();
|
|
|
|
}
|
|
|
|
|
|
|
|
public void OnUpdate(NpcStateMachine npcStateMachine)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public void OnExit(NpcStateMachine npcStateMachine)
|
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
public INpcState Clone()
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|