62 lines
1.9 KiB
C#
62 lines
1.9 KiB
C#
using FSM;
|
|
using System.Buffers;
|
|
using ZXKFramework;
|
|
namespace YiLiao.JingMaiLiuZhiZhen
|
|
{
|
|
public class ShenFenHeDuiState : FsmState<FSMManager>
|
|
{
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.ShowCamera("ShenFenHeDuiState_Camera");
|
|
fsm.ShowSpeakPanel(new UnityEngine.Vector3(-220, 222),
|
|
"请问您是几床?叫什么名字?",
|
|
"名字", 2, 1, SpeakAction);
|
|
fsm.InteractionDown("腕带", args => {
|
|
fsm.HideTipBtn();
|
|
fsm.HideArrow();
|
|
fsm.AddScore(1, 1);
|
|
fsm.InteractionDown("腕带", null);
|
|
fsm.Unlight_DisableInteraction("腕带");
|
|
fsm.PlayClip("核对患者3", () => {
|
|
fsm.nextState = true;
|
|
});
|
|
});
|
|
}
|
|
private void SpeakAction(int args1, string callBackTxt)
|
|
{
|
|
if (args1 == 1)
|
|
{
|
|
fsm.AddScore(1, 2);
|
|
}
|
|
else if (args1 == 0)
|
|
{
|
|
fsm.AddScore(0, 2);
|
|
}
|
|
else
|
|
{
|
|
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
|
|
}
|
|
fsm.PlayClip("核对患者2", () => {
|
|
fsm.ShowCamera("ShenFenHeDuiState_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;
|
|
}
|
|
}
|
|
}
|