Exemple #1
0
        /// <summary>
        /// 开始写入
        /// </summary>
        /// <param name="_messageId"></param>
        /// <returns></returns>
        public IMessageWriter WriteBegin(int _messageId)
        {
            ResetWriter();
            binaryWrite.Write(MESSAGE_HEAD_TAG.SwapInt16());
            binaryWrite.Write(DEFAULT_SIZE.SwapInt16());
            binaryWrite.Write(_messageId.SwapInt32());
            IsSendLog = LoggerQ.IsLogByMessageCode(_messageId);

            if (true == IsSendLog)
            {
                // 添加消息号
                AddSpecifyStringLogCache("SEND = " + _messageId + "   TIME : " +
                                         string.Format("[{0}]", DateTime.Now.TimeOfDay));
                LogCache.Add("—————————————————————");
            }

            return(this);
        }
Exemple #2
0
        /// <summary>
        /// 显示的初始化
        /// </summary>
        public void Init()
        {
            // 资源加载
            if (LoggerQ.GetResourceLoadType() == ResourceLoadType.AssetBundle)
            {
                // 资源更新模块
                assetBundleResUpdate = new AssetBundleResUpdate();
                assetBundleResUpdate.Init();

                // 资源加载模块
                resourcesLoad = new ResourcesAssetBundleLoader();
            }
            else
            {
                resourcesLoad = new ResourcesEditorLoader(); // 默认使用Editor
            }
            resourcesLoad.Init();
#if UNITY_EDITOR
            if (true == resourcesLoad is ResourcesAssetBundleLoader)
            {
                this.Error("目前在EDITOR环境下使用AssetBundle进行测试,资源全部来自于资源服务器!!!");
            }
#endif
        }