46 lines
1.1 KiB
C#
46 lines
1.1 KiB
C#
using FSM;
|
|
using UnityEngine;
|
|
using ZXKFramework;
|
|
namespace DongWuYiXue.QiGuanChaGuan
|
|
{
|
|
public class BaoLuHuiYanState : FsmState<FSMManager>
|
|
{
|
|
bool isChaRu;
|
|
Coroutine cor;
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
this.Log("进入暴露会厌状态");
|
|
fsm.ShowCamera("暴露会厌_Camera");
|
|
fsm.ShowTip(0);
|
|
cor = Game.Instance.IEnumeratorManager.Run(3.0f, () =>
|
|
{
|
|
isChaRu = true;
|
|
});
|
|
}
|
|
public override void OnStateStay()
|
|
{
|
|
base.OnStateStay();
|
|
if (isChaRu)
|
|
{
|
|
isChaRu = false;
|
|
fsm.PlayClip("暴露会厌_TimeLine", () =>
|
|
{
|
|
fsm.nextState = true;
|
|
});
|
|
}
|
|
}
|
|
public override void OnStateExit()
|
|
{
|
|
base.OnStateExit();
|
|
isChaRu = false;
|
|
if (null != cor)
|
|
{
|
|
Game.Instance.IEnumeratorManager.Stop(cor);
|
|
cor = null;
|
|
}
|
|
fsm.nextState = false;
|
|
}
|
|
}
|
|
}
|