using FSM; namespace YiLiao.JingMaiLiuZhiZhen { public class XiaoDuPiFuState : FsmState { public override void OnStateEnter() { base.OnStateEnter(); fsm.ShowTip(0); fsm.ShowCamera("XiaoDuPiFuState_Camera"); if(fsm.main_gameModel.modeType == ZXKFramework.ModeType.ShiXun) { fsm.PlayClip("消毒皮肤", () => { fsm.ShowTip(1); fsm.PlayBgm(1); fsm.ShowArrow("请拖拽棉签", "碘伏棉签3"); fsm.Show_Light_EnableInteraction("碘伏棉签3"); }); } if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.KaoHe) { fsm.PlayClip("消毒皮肤_kaohe", () => { fsm.ShowArrow("请拖拽棉签", "碘伏棉签3"); fsm.Show_Light_EnableInteraction("碘伏棉签3"); fsm.ShowTipBtn(() => { fsm.ShowArrow("请拖拽棉签", "碘伏棉签3", 0, 0, 5, true); fsm.Show_Light_EnableInteraction("碘伏棉签3", true); }, 2); }); } fsm.InteractionDown("碘伏棉签3", obj => { fsm.HideTipBtn(); fsm.HideArrow(); fsm.Show_Light_EnableInteraction("手背高亮处",true); //obj.GetComponent().ChangeAfter(); }); fsm.InteractionUp("碘伏棉签3", obj => { fsm.Hide_Unlight_DisableInteraction("手背高亮处"); //obj.GetComponent().ChangeBefore(); }); fsm.InteractionTrigger("手背高亮处", args => { if(args.name == "碘伏棉签3") { fsm.AddScore(3, 1); fsm.InteractionTrigger("手背高亮处", null); fsm.Hide_Unlight_DisableInteraction("手背高亮处"); fsm.Hide_Unlight_DisableInteraction("碘伏棉签3"); fsm.ShowCamera("XiaoDuPiFuState_Camera2"); fsm.PlayClip("消毒皮肤2", () => { fsm.nextState = true; }); } }); } public override void OnStateExit() { base.OnStateExit(); fsm.nextState = false; } } }