using FSM; using UnityEngine; using ZXKFramework; namespace YiLiao.JingMaiLiuZhiZhen { public class HeDuiHuanZheState : FsmState { public override void OnStateEnter() { base.OnStateEnter(); fsm.ShowTip(0); fsm.PlayBgm(0); fsm.ShowCamera("HeDuiHuanZheState_Camera"); fsm.PlayClip("核对患者"); fsm.ShowSpeakPanel(new UnityEngine.Vector3(-220, 222), "请问您是几床?叫什么名字?", "名字", 2, 1, SpeakAction); fsm.InteractionDown("腕带", args => { fsm.HideTipBtn(); fsm.AddScore(1, 1); fsm.HideArrow(); fsm.InteractionDown("腕带",null); fsm.Unlight_DisableInteraction("腕带"); fsm.PlayClip("核对患者3", () => { fsm.nextState = true; }); }); } private void SpeakAction(int args1, string callBackTxt) { if (args1 == 1) { if(fsm.main_gameModel.modeType == ModeType.ShiXun) { fsm.AddScore(1, 2); } if (fsm.main_gameModel.modeType == ModeType.KaoHe) { fsm.AddScore(2, 2); } } else if (args1 == 0) { fsm.AddScore(0, 2); } else { Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true }); } fsm.PlayClip("核对患者2", () => { fsm.ShowCamera("HeDuiHuanZheState_Camera2"); fsm.Light_EnableInteraction("腕带"); fsm.ShowArrow("请点击腕带","腕带",0,2,5); fsm.ShowTipBtn(() => { fsm.Light_EnableInteraction("腕带", true); fsm.ShowArrow("请点击腕带", "腕带", 0, 0, 5, true); },2); fsm.ShowTip(1); fsm.PlayBgm(1); }); } public override void OnStateExit() { base.OnStateExit(); fsm.nextState = false; } } }