129 lines
4.7 KiB
C#
129 lines
4.7 KiB
C#
using FSM;
|
|
using System.Data;
|
|
using ZXKFramework;
|
|
namespace YiLiao.JingMaiLiuZhiZhen
|
|
{
|
|
public class PingGuState : FsmState<FSMManager>
|
|
{
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
fsm.ShowCamera("PingGuState_Camera");
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.ShowSpeakPanel(new UnityEngine.Vector3(-220, 222),
|
|
"王丽,为了让输液更顺利,我们需要找一条最适合的血管。",
|
|
"适合的血管", 1, 1, SpeakAction);
|
|
fsm.InteractionDown("头静脉", args => {
|
|
fsm.InteractionDown("头静脉文字",null);
|
|
fsm.Unlight_DisableInteraction("头静脉");
|
|
fsm.Show("头静脉文字");
|
|
fsm.Light_EnableInteraction("贵要静脉",true);
|
|
});
|
|
fsm.InteractionDown("贵要静脉", args => {
|
|
fsm.InteractionDown("贵要静脉",null);
|
|
fsm.Unlight_DisableInteraction("贵要静脉");
|
|
fsm.Show("贵要静脉文字");
|
|
fsm.Light_EnableInteraction("手背静脉弓", true);
|
|
});
|
|
fsm.InteractionDown("手背静脉弓", args => {
|
|
fsm.InteractionDown("手背静脉弓", null);
|
|
fsm.Unlight_DisableInteraction("手背静脉弓");
|
|
fsm.Show("手背静脉弓文字");
|
|
fsm.Light_EnableInteraction("掌背静脉", true);
|
|
});
|
|
fsm.InteractionDown("掌背静脉", args => {
|
|
fsm.InteractionDown("掌背静脉", null);
|
|
fsm.Unlight_DisableInteraction("掌背静脉");
|
|
fsm.Show("掌背静脉文字");
|
|
if(fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(2, 2);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
|
|
}
|
|
fsm.HideTip();
|
|
fsm.PlayClip("评估2", () => {
|
|
fsm.ShowCamera("PingGuState_Camera");
|
|
fsm.PlayBgm(2);
|
|
fsm.ShowTip(2);
|
|
fsm.ShowSpeakPanel(new UnityEngine.Vector3(-220, 222),
|
|
"好的,位置选好了。在开始扎针消毒前,我想问问您:需要先去个洗手间吗?或者现在需要调整一下躺/坐的姿势让自己更舒服一点吗?。",
|
|
"洗手间", 2, 1, SpeakAction2);
|
|
});
|
|
});
|
|
}
|
|
|
|
private void SpeakAction2(int args1, string arg2)
|
|
{
|
|
if (args1 == 1)
|
|
{
|
|
if(fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.AddScore(2, 3);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(1, 3);
|
|
}
|
|
}
|
|
else if (args1 == 0)
|
|
{
|
|
fsm.AddScore(0, 3);
|
|
}
|
|
else
|
|
{
|
|
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
|
|
}
|
|
fsm.PlayClip("评估3", () => {
|
|
fsm.nextState = true;
|
|
});
|
|
}
|
|
|
|
private void SpeakAction(int args1, string arg2)
|
|
{
|
|
if (args1 == 1)
|
|
{
|
|
fsm.AddScore(1, 1);
|
|
}
|
|
else if (args1 == 0)
|
|
{
|
|
fsm.AddScore(0, 1);
|
|
}
|
|
else
|
|
{
|
|
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
|
|
}
|
|
if(fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.ShowTxtQuestion(0, 3, 2, () =>
|
|
{
|
|
fsm.ShowCamera("PingGuState_Camera2");
|
|
fsm.ShowTip(1, true);
|
|
fsm.PlayBgm(1, true);
|
|
fsm.PlayClip("评估", () => {
|
|
fsm.Light_EnableInteraction("头静脉", true);
|
|
});
|
|
});
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.ShowCamera("PingGuState_Camera2");
|
|
fsm.ShowTip(1, true);
|
|
fsm.PlayBgm(1, true);
|
|
fsm.PlayClip("评估", () => {
|
|
fsm.Light_EnableInteraction("头静脉", true);
|
|
});
|
|
}
|
|
}
|
|
|
|
public override void OnStateExit()
|
|
{
|
|
base.OnStateExit();
|
|
fsm.nextState = false;
|
|
}
|
|
}
|
|
}
|