public void Start() { Debug.Log("热更新层启动!"); m_FsmManager = new FsmManager(); m_ProcedureManager = new ProcedureManager(); //初始化流程管理器并开始流程 m_ProcedureManager.Initialize(m_FsmManager , new ProcedureHotfixEntry() , new ProcedureChangeScene() , new ProcedureHotfixTest() ); m_ProcedureManager.StartProcedure <ProcedureHotfixEntry>(); //初始化ET网络 ETNetwork.Init(); }
protected internal override async void OnUpdate(IFsm procedureOwner, float elapseSeconds, float realElapseSeconds) { base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds); if (Input.GetKeyDown(KeyCode.A)) { Session session = ETNetwork.CreateHotfixSession(GameEntry.ETNetwork.CreateSession(GameEntry.ETNetwork.ServerIP)); session.Send(new HotfixTestMessage() { Info = "6666" }); HotfixRpcResponse response = (HotfixRpcResponse)await session.Call(new HotfixRpcRequest() { Info = "Hello Server" }); Debug.Log(response.Info); session.Dispose(); } }
public void ShutDown() { m_ProcedureManager.Shutdown(); m_FsmManager.Shutdown(); ETNetwork.Shutdown(); }
public void Update(float elapseSeconds, float realElapseSeconds) { m_FsmManager.Update(elapseSeconds, realElapseSeconds); ETNetwork.Update(); }