using FSM; using UnityEngine; using ZXKFramework; namespace DongWuYiXue.DaoNiaoShu { public class QingJieNiaoDaoKouState : FsmState { 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; } } }