示例#1
0
        /// <summary>
        /// 关闭热更新
        /// </summary>
        public void ShutDown()
        {
            HotfixEntry.Event.RemoveEventListener(LoadDataTableSuccessGameEvent.EventId, OnLoadDataTableSuccess);
            HotfixEntry.Event.RemoveEventListener(LoadDataTableFailureGameEvent.EventId, OnLoadDataTableFailure);

            Debug.Log("热更新关闭!");
            for (LinkedListNode <IHotfixComponent> curr = m_GameComponentList.First; curr != null; curr = curr.Next)
            {
                curr.Value.Shutdown();
            }

            SocketProtoListener.RemoveProtoListener();
        }
示例#2
0
        public void Start()
        {
            Debug.Log("热更新层启动!");
            //热修复
            //Fiaxed.Init();

            //todo 初始化组件在这里进行
            DataTable = GetComponent <DataTableComponent>();
            Entity    = GetComponent <EntityComponent>();
            Event     = GetComponent <EventComponent>();
            Fsm       = GetComponent <FsmComponent>();
            Pool      = GetComponent <PoolComponent>();

            SocketProtoListener.AddProtoListener();
            HotfixEntry.Event.AddEventListener(LoadDataTableSuccessGameEvent.EventId, OnLoadDataTableSuccess);
            HotfixEntry.Event.AddEventListener(LoadDataTableFailureGameEvent.EventId, OnLoadDataTableFailure);
            //GameEntry.Event.CommonEvent.AddEventListener(ZJY.Framework.LoadDataTableSuccessGameEvent.EventId, OK);
            //HotfixEntry.Event.AddEventListener(LoadDataTableSuccessGameEvent.EventId, OK1);
        }