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

78 lines
2.4 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

using FSM;
using System;
using System.Buffers;
using ZXKFramework;
namespace YiLiao.JingMaiLiuZhiZhen
{
public class JianChaPingQianState : FsmState<FSMManager>
{
public override void OnStateEnter()
{
base.OnStateEnter();
fsm.ShowCamera("JianChaPingQianState_Camera");
fsm.ShowTip(0);
fsm.PlayBgm(0);
fsm.Light_EnableInteraction("氯化钠注射液");
fsm.ShowArrow("点击氯化钠注射液", "氯化钠注射液");
fsm.ShowTipBtn(() => {
fsm.Light_EnableInteraction("氯化钠注射液", true);
fsm.ShowArrow("点击氯化钠注射液", "氯化钠注射液",0,0,5,true);
},2);
fsm.InteractionDown("氯化钠注射液", args => {
fsm.HideTipBtn();
fsm.AddScore(1, 1);
fsm.InteractionDown("氯化钠注射液",null);
fsm.HideArrow();
fsm.Unlight_DisableInteraction("氯化钠注射液");
fsm.PlayClip("检查瓶签", () => {
fsm.ShowTip(1);
fsm.PlayBgm(1);
fsm.ShowCamera("JianChaPingQianState_Camera2");
fsm.ShowSpeakPanel(new UnityEngine.Vector3(638, 23),
"药名0.9%氯化钠注射液浓度0.9%剂量100ml有效期至2038年06月30日。",
"有效期至2038年06月30日", 1, 0, SpeakAction);
});
});
}
private void SpeakAction(int args1, string arg2)
{
if (args1 == 1)
{
if(fsm.main_gameModel.modeType == ModeType.KaoHe)
{
fsm.AddScore(2, 2);
}
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
{
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.nextState = true;
});
}
public override void OnStateStay()
{
base.OnStateStay();
}
public override void OnStateExit()
{
base.OnStateExit();
fsm.PlayClip("检查瓶签Reset");
fsm.nextState = false;
}
}
}