48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using FSM;
|
|
using System;
|
|
using System.Buffers;
|
|
using ZXKFramework;
|
|
namespace YiLiao.JingMaiLiuZhiZhen
|
|
{
|
|
public class GuDingSongQuanState : FsmState<FSMManager>
|
|
{
|
|
public override void OnStateEnter()
|
|
{
|
|
base.OnStateEnter();
|
|
fsm.ShowTip(0);
|
|
fsm.PlayBgm(0);
|
|
fsm.ShowCamera("HuanZheSongQuanState_Camera");
|
|
fsm.PlayClip("患者松拳");
|
|
fsm.ShowSpeakPanel(new UnityEngine.Vector3(-220, 222),
|
|
"王丽,请松拳。",
|
|
"请松拳", 2, 1, SpeakAction);
|
|
}
|
|
|
|
private void SpeakAction(int args1, string arg2)
|
|
{
|
|
fsm.ShowCamera("HuanZheSongQuanState_Camera2");
|
|
if (args1 == 1)
|
|
{
|
|
fsm.AddScore(1, 1);
|
|
}
|
|
else if (args1 == 0)
|
|
{
|
|
fsm.AddScore(0, 1);
|
|
}
|
|
else
|
|
{
|
|
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
|
|
}
|
|
fsm.PlayClip("扎完松手", () => {
|
|
fsm.nextState = true;
|
|
});
|
|
}
|
|
|
|
public override void OnStateExit()
|
|
{
|
|
base.OnStateExit();
|
|
fsm.nextState = false;
|
|
}
|
|
}
|
|
}
|