64 lines
1.8 KiB
C#

using FSM;
using System.Buffers;
using UnityEngine;
using ZXKFramework;
namespace DongWuYiXue.DaoNiaoShu
{
public class TiWeiState : FsmState<FSMManager>
{
public override void OnStateEnter()
{
base.OnStateEnter();
this.Log("进入体位状态");
fsm.Show("女助手文字位置");
fsm.ShowCamera("体位_Camera");
fsm.ShowTip(0);
fsm.PlayBgm(0);
fsm.ShowSpeakPanel(new Vector3(-25f, 85f),
"请助手将宠物犬体位摆放为右侧卧位",
"右侧卧位", 2, 1, SpeakAction);
}
private void SpeakAction(int arg1, string arg2)
{
switch (arg1)
{
case 0:
fsm.AddScore(0, 0);
break;
case 1:
if (fsm.main_gameModel.modeType == ModeType.ShiXun)
{
fsm.AddScore(5, 0);
}
if (fsm.main_gameModel.modeType == ModeType.KaoHe)
{
fsm.AddScore(5, 0);
}
break;
case 2:
fsm.AddScore(0, 0, true);
Game.Instance.eventManager.Raise(new PlayTrueOrFalseEvent() { isTrue = true });
break;
default:
break;
}
fsm.PlayClip("体位_TimeLine", () =>
{
fsm.nextState = true;
});
}
public override void OnStateStay()
{
base.OnStateStay();
}
public override void OnStateExit()
{
base.OnStateExit();
fsm.Hide("女助手文字位置");
fsm.nextState = false;
}
}
}