145 lines
5.8 KiB
C#
145 lines
5.8 KiB
C#
using FSM;
|
|
using ZXKFramework;
|
|
namespace DongWuYiXue.QiGuanChaGuan
|
|
{
|
|
public class JianChaTaoNangQiMiXingState : FsmState<FSMManager>
|
|
{
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
this.Log("进入检查套囊气密性状态");
|
|
fsm.ShowCamera("检查套囊气密性_Camera");
|
|
|
|
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.ShowTxtQuestion("操作前准备》检查套囊气密性》步骤1", 1, 4, 4, () =>
|
|
{
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.Show("5ml注射器");
|
|
fsm.Light_EnableInteraction("5ml注射器");
|
|
fsm.Light("10mm气管导管");
|
|
fsm.EnableInteraction("10气管导管气密性");
|
|
fsm.ShowArrow("请拖拽5ml注射器", "5ml注射器");
|
|
fsm.ShowTipBtn(() =>
|
|
{
|
|
fsm.Light("10mm气管导管",true);
|
|
fsm.Light_EnableInteraction("5ml注射器", true);
|
|
fsm.ShowArrow("请拖拽5ml注射器", "5ml注射器", 0, 0, 5, true);
|
|
}, 2);
|
|
});
|
|
}
|
|
else if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.Show("5ml注射器");
|
|
fsm.Light_EnableInteraction("5ml注射器");
|
|
fsm.Light("10mm气管导管");
|
|
fsm.EnableInteraction("10气管导管气密性");
|
|
fsm.ShowArrow("请拖拽5ml注射器", "5ml注射器");
|
|
}
|
|
fsm.InteractionTrigger("5ml注射器", c =>
|
|
{
|
|
if (c.name.Equals("10气管导管气密性"))
|
|
{
|
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(2, 0);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.AddScore(4, 0);
|
|
}
|
|
fsm.HideArrow();
|
|
fsm.Hide("5ml注射器");
|
|
fsm.DisableInteraction("10气管导管气密性");
|
|
fsm.Unlight_DisableInteraction("5ml注射器");
|
|
fsm.Unlight("10mm气管导管");
|
|
fsm.PlayClip("检查套囊气密性1_TimeLine", () =>
|
|
{
|
|
fsm.Show("5ml注射器");
|
|
fsm.Light_EnableInteraction("5ml注射器");
|
|
fsm.Light("12mm气管导管");
|
|
fsm.EnableInteraction("12气管导管检查气密性");
|
|
fsm.ShowArrow("请拖拽5ml注射器", "5ml注射器");
|
|
fsm.ShowTipBtn(() =>
|
|
{
|
|
fsm.Light("12mm气管导管", true);
|
|
fsm.Light_EnableInteraction("5ml注射器", true);
|
|
fsm.ShowArrow("请拖拽5ml注射器", "5ml注射器", 0, 0, 5, true);
|
|
}, 2);
|
|
});
|
|
}
|
|
if (c.name.Equals("12气管导管检查气密性"))
|
|
{
|
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(2, 1);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.AddScore(4, 1);
|
|
}
|
|
fsm.HideArrow();
|
|
fsm.Hide("5ml注射器");
|
|
fsm.Unlight_DisableInteraction("5ml注射器");
|
|
fsm.Unlight("12mm气管导管");
|
|
fsm.DisableInteraction("12气管导管检查气密性");
|
|
fsm.PlayClip("检查套囊气密性2_TimeLine", () =>
|
|
{
|
|
fsm.Show("5ml注射器");
|
|
fsm.Light_EnableInteraction("5ml注射器");
|
|
fsm.Light("14mm气管导管");
|
|
fsm.EnableInteraction("14气管导管检查气密性");
|
|
fsm.ShowArrow("请拖拽5ml注射器", "5ml注射器");
|
|
fsm.ShowTipBtn(() =>
|
|
{
|
|
fsm.Light("14mm气管导管", true);
|
|
fsm.Light_EnableInteraction("5ml注射器", true);
|
|
fsm.ShowArrow("请拖拽5ml注射器", "5ml注射器", 0, 0, 5, true);
|
|
}, 2);
|
|
});
|
|
}
|
|
if (c.name.Equals("14气管导管检查气密性"))
|
|
{
|
|
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
|
|
{
|
|
fsm.AddScore(1, 2);
|
|
}
|
|
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
|
|
{
|
|
fsm.AddScore(4, 2);
|
|
}
|
|
fsm.HideArrow();
|
|
fsm.Hide("5ml注射器");
|
|
fsm.Unlight_DisableInteraction("5ml注射器");
|
|
fsm.Unlight("14mm气管导管");
|
|
fsm.DisableInteraction("14气管导管检查气密性");
|
|
fsm.PlayClip("检查套囊气密性3_TimeLine", () =>
|
|
{
|
|
fsm.nextState = true;
|
|
});
|
|
}
|
|
});
|
|
}
|
|
public override void OnStateStay()
|
|
{
|
|
base.OnStateStay();
|
|
}
|
|
public override void OnStateExit()
|
|
{
|
|
base.OnStateExit();
|
|
fsm.Unlight_DisableInteraction("5ml注射器");
|
|
fsm.Unlight("14mm气管导管");
|
|
fsm.DisableInteraction("14气管导管检查气密性");
|
|
fsm.Unlight("12mm气管导管");
|
|
fsm.DisableInteraction("12气管导管检查气密性");
|
|
fsm.Unlight("10mm气管导管");
|
|
fsm.DisableInteraction("10气管导管气密性");
|
|
|
|
fsm.nextState = false;
|
|
}
|
|
}
|
|
}
|