56 lines
1.6 KiB
C#
56 lines
1.6 KiB
C#
using FSM;
|
||
using System;
|
||
using System.Buffers;
|
||
using Unity.VisualScripting.FullSerializer;
|
||
using ZXKFramework;
|
||
namespace YiLiao.JingMaiLiuZhiZhen
|
||
{
|
||
public class YaoYeBiaoQianHeDuiState : FsmState<FSMManager>
|
||
{
|
||
public override void OnStateEnter()
|
||
{
|
||
base.OnStateEnter();
|
||
fsm.ShowCamera("YaoYeBiaoQianHeDuiState_Camera");
|
||
fsm.ShowTip(0);
|
||
fsm.PlayBgm(0);
|
||
fsm.PlayClip("药液标签核对");
|
||
fsm.ShowSpeakPanel(new UnityEngine.Vector3(-220, 222),
|
||
"这是0.9%氯化钠注射液,剂量是100ml,浓度是0.9%,通过静脉输液进入您的血管,患者姓名是王丽,请问这是您的名字吗?",
|
||
"名字", 2, 1, SpeakAction);
|
||
}
|
||
|
||
private void SpeakAction(int args1, string arg2)
|
||
{
|
||
if (args1 == 1)
|
||
{
|
||
if(fsm.main_gameModel.modeType == ModeType.ShiXun)
|
||
{
|
||
fsm.AddScore(2, 1);
|
||
}
|
||
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
||
{
|
||
fsm.AddScore(1, 1);
|
||
}
|
||
}
|
||
else if (args1 == 0)
|
||
{
|
||
fsm.AddScore(0, 1);
|
||
}
|
||
else
|
||
{
|
||
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
|
||
}
|
||
fsm.PlayClip("药液标签核对2", () => {
|
||
fsm.nextState = true;
|
||
});
|
||
}
|
||
|
||
public override void OnStateExit()
|
||
{
|
||
base.OnStateExit();
|
||
fsm.PlayClip("药液标签核对Reset");
|
||
fsm.nextState = false;
|
||
}
|
||
}
|
||
}
|