55 lines
1.8 KiB
C#
55 lines
1.8 KiB
C#
using FSM;
|
|
namespace YiLiao.JingMaiLiuZhiZhen
|
|
{
|
|
public class FangZhiDianZhenState : FsmState<FSMManager>
|
|
{
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.ShowCamera("FangZhiDianZhenState_Camera");
|
|
fsm.ShowArrow("请拖拽垫枕","垫枕");
|
|
fsm.Light_EnableInteraction("垫枕");
|
|
|
|
fsm.ShowTipBtn(() => {
|
|
fsm.ShowArrow("请拖拽垫枕", "垫枕",0, 0, 5, true);
|
|
fsm.Light_EnableInteraction("垫枕", true);
|
|
},2);
|
|
|
|
fsm.InteractionDown("垫枕", obj => {
|
|
fsm.HideTipBtn();
|
|
fsm.HideArrow();
|
|
fsm.Show_Light_EnableInteraction("垫枕高亮处", true);
|
|
});
|
|
fsm.InteractionUp("垫枕", obj => {
|
|
fsm.Hide_Unlight_DisableInteraction("垫枕高亮处");
|
|
});
|
|
fsm.InteractionTrigger("垫枕高亮处", args => {
|
|
if(args.name == "垫枕")
|
|
{
|
|
if(fsm.main_gameModel.modeType == ZXKFramework.ModeType.KaoHe)
|
|
{
|
|
fsm.AddScore(2, 1);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ZXKFramework.ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(1, 1);
|
|
}
|
|
fsm.Hide_Unlight_DisableInteraction("垫枕高亮处");
|
|
fsm.Hide_Unlight_DisableInteraction("垫枕");
|
|
fsm.InteractionTrigger("垫枕高亮处", null);
|
|
fsm.PlayClip("拖拽垫枕", () => {
|
|
fsm.nextState = true;
|
|
});
|
|
}
|
|
});
|
|
}
|
|
public override void OnStateExit()
|
|
{
|
|
base.OnStateExit();
|
|
fsm.nextState = false;
|
|
}
|
|
}
|
|
}
|