77 lines
2.2 KiB
C#
77 lines
2.2 KiB
C#
using CustomComponent;
|
|
using UI;
|
|
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;
|
|
|
|
namespace Procedure
|
|
{
|
|
public class ProcedureCombine : ProcedureBase
|
|
{
|
|
#region Property
|
|
|
|
/// <summary>
|
|
/// 拼装玩法组件入口。
|
|
/// </summary>
|
|
private CombineComponent _combineComponent = null;
|
|
|
|
/// <summary>
|
|
/// 当前流程不使用原生对话框。
|
|
/// </summary>
|
|
public override bool UseNativeDialog => false;
|
|
|
|
#endregion
|
|
|
|
#region FSM
|
|
|
|
/// <summary>
|
|
/// 进入流程:重置状态、订阅事件、拉取组件。
|
|
/// </summary>
|
|
protected override void OnEnter(ProcedureOwner procedureOwner)
|
|
{
|
|
base.OnEnter(procedureOwner);
|
|
AIChatEntryRuntime.EnsureOpen();
|
|
|
|
GameEntry.Dialog.Init(1);
|
|
|
|
//GameEntry.Dialog.StartDialog(1001);
|
|
GameEntry.Dialog.StartDialog(1002);
|
|
|
|
// AIChatFormContext context = new AIChatFormContext();
|
|
//
|
|
// AIChatFormController controller = new AIChatFormController();
|
|
// context.Controller = controller;
|
|
// controller.OpenUI(context);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 离开流程:反订阅事件、停止关卡并清理状态。
|
|
/// </summary>
|
|
protected override void OnLeave(ProcedureOwner procedureOwner, bool isShutdown)
|
|
{
|
|
base.OnLeave(procedureOwner, isShutdown);
|
|
}
|
|
|
|
/// <summary>
|
|
/// 流程逐帧更新:
|
|
/// 1. 未结算时推进关卡运行;
|
|
/// 2. 已结算时推进重开倒计时。
|
|
/// </summary>
|
|
protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds)
|
|
{
|
|
base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds);
|
|
|
|
if (GameEntry.Dialog.IsInitialized)
|
|
{
|
|
}
|
|
// if (TryUpdateRound(realElapseSeconds))
|
|
// {
|
|
// return;
|
|
// }
|
|
//
|
|
// TryRestartScene(procedureOwner, realElapseSeconds);
|
|
}
|
|
|
|
#endregion
|
|
|
|
}
|
|
}
|