2025-09-19 17:28:05 +08:00

48 lines
1.2 KiB
C#

using FSM;
using System;
using System.Buffers;
using ZXKFramework;
namespace YiLiao.JingMaiLiuZhiZhen
{
public class ZaiCiQueRenState : FsmState<FSMManager>
{
public override void OnStateEnter()
{
base.OnStateEnter();
fsm.ShowCamera("ZaiCiQueRenState_Camera");
fsm.PlayClip("再次确认", () => {
fsm.ShowTip(0);
fsm.PlayBgm(0);
fsm.ShowSpeakPanel(new UnityEngine.Vector3(267, 366),
"一致,执行。",
"一致", 0, 1, SpeakAction);
});
}
private void SpeakAction(int arg1, string arg2)
{
if (arg1 == 1)
{
fsm.AddScore(1, 1);
}
else if (arg1 == 0)
{
fsm.AddScore(0, 1);
}
else
{
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
}
fsm.PlayClip("再次确认Reset", () => {
fsm.nextState = true;
});
}
public override void OnStateExit()
{
base.OnStateExit();
fsm.nextState = false;
}
}
}