75 lines
2.4 KiB
C#
75 lines
2.4 KiB
C#
using FSM;
|
|
using UnityEngine;
|
|
using ZXKFramework;
|
|
namespace DongWuYiXue.DaoNiaoShu
|
|
{
|
|
public class QingJieBaoPiKouState : FsmState<FSMManager>
|
|
{
|
|
Coroutine cor;
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
this.Log("쏵흙헌썅관튄왯섟鷺鍋튄륀榴檄");
|
|
|
|
fsm.ShowCamera("헌썅관튄왯1_Camera");
|
|
fsm.Light_EnableInteraction("쪘성땍춈헷");
|
|
fsm.ShowArrow("듐샌쪘성땍춈헷", "쪘성땍춈헷");
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.ShowTipBtn(() =>
|
|
{
|
|
fsm.Light_EnableInteraction("쪘성땍춈헷", true);
|
|
fsm.ShowArrow("듐샌쪘성땍춈헷", "쪘성땍춈헷", 0, 0, 5, true);
|
|
}, 2);
|
|
fsm.InteractionDown("쪘성땍춈헷", c =>
|
|
{
|
|
fsm.HideTipBtn();
|
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(4, 0);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.AddScore(3, 0);
|
|
}
|
|
fsm.HideArrow();
|
|
fsm.ShowCamera("헌썅관튄왯2_Camera");
|
|
fsm.Unlight_DisableInteraction("쪘성땍춈헷");
|
|
fsm.ShowTip(1);
|
|
fsm.PlayBgm(1);
|
|
fsm.Show("癎컬퀄綾句뗀");
|
|
cor = Game.Instance.IEnumeratorManager.Run(3.0f, () =>
|
|
{
|
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(5, 1);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.AddScore(5, 1);
|
|
}
|
|
fsm.nextState = true;
|
|
});
|
|
});
|
|
}
|
|
public override void OnStateStay()
|
|
{
|
|
base.OnStateStay();
|
|
}
|
|
public override void OnStateExit()
|
|
{
|
|
base.OnStateExit();
|
|
fsm.HideTipBtn();
|
|
if (null != cor)
|
|
{
|
|
Game.Instance.IEnumeratorManager.Stop(cor);
|
|
cor = null;
|
|
}
|
|
fsm.HideArrow();
|
|
fsm.Hide("癎컬퀄綾句뗀");
|
|
fsm.Unlight_DisableInteraction("쪘성땍춈헷");
|
|
fsm.nextState = false;
|
|
}
|
|
}
|
|
}
|