45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using FSM;
|
|
using UnityEngine;
|
|
namespace YiLiao.JingMaiLiuZhiZhen
|
|
{
|
|
public class DaKaiTiaoJieQiState : FsmState<FSMManager>
|
|
{
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
fsm.ShowCamera("DaKaiTiaoJieQiState_Camera");
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.ShowArrow(new Vector2(-140,-167), 3);
|
|
fsm.Light_EnableInteraction("固定打开调节器");
|
|
|
|
fsm.ShowTipBtn(() => {
|
|
fsm.ShowArrow(new Vector2(-140, -167), 3, 0, 5, true);
|
|
fsm.Light_EnableInteraction("固定打开调节器", true);
|
|
},2);
|
|
|
|
fsm.InteractionDown("固定打开调节器", obj => {
|
|
fsm.HideTipBtn();
|
|
fsm.HideArrow();
|
|
});
|
|
fsm.InteractionStay("固定打开调节器", args => {
|
|
if(args.GetComponent<LinearMapping>().value == 1)
|
|
{
|
|
fsm.AddScore(1, 1);
|
|
fsm.Unlight_DisableInteraction("固定打开调节器");
|
|
fsm.InteractionStay("固定打开调节器",null);
|
|
fsm.PlayClip("打开调节器", () => {
|
|
fsm.nextState = true;
|
|
});
|
|
}
|
|
});
|
|
}
|
|
|
|
public override void OnStateExit()
|
|
{
|
|
base.OnStateExit();
|
|
fsm.nextState = false;
|
|
}
|
|
}
|
|
}
|