protected override void OnEnter(ProcedureOwner procedureOwner)
        {
            base.OnEnter(procedureOwner);
            Log.Info("<color=lime>进入<检查version资源>流程.</color>");

            m_VersionListUpdataComplete = false;
            m_InitResourcesComplete     = false;

            m_UpdateVersionListCallbacks = new UpdateVersionListCallbacks(OnVersionListUpdateSuccess, OnVersionListUpdateFailure);
            GameEntry.Event.Subscribe(WebRequestSuccessEventArgs.EventId, OnWebRequestSuccess);
            GameEntry.Event.Subscribe(WebRequestFailureEventArgs.EventId, OnWebRequestFailure);

            //是否是编辑器模式
            if (GameEntry.Base.EditorResourceMode)
            {
                m_InitResourcesComplete = true;
            }
            else
            {
                //单机模式直接初始化资源
                if (GameEntry.Resource.ResourceMode == GameFramework.Resource.ResourceMode.Package)
                {
                    GameEntry.Resource.InitResources(OnInitResourcesComplete);
                }
                else
                {
                    RequestVersion();
                }
            }
        }
        protected override void OnInit(ProcedureOwner procedureOwner)
        {
            base.OnInit(procedureOwner);

            m_UpdateVersionListCallbacks =
                new UpdateVersionListCallbacks(OnUpdateVersionListSuccess, OnUpdateVersionListFailure);
        }
Beispiel #3
0
        protected override void OnEnter(ProcedureOwner procedureOwner)
        {
            base.OnEnter(procedureOwner);

            m_InitResourcesComplete      = false;
            m_UpdateVersionListCallbacks = new UpdateVersionListCallbacks(OnUpdateVersionListSuccess, OnUpdateVersionListFailure);

            GameEntry.Event.Subscribe(WebRequestSuccessEventArgs.EventId, OnWebRequestSuccess);
            GameEntry.Event.Subscribe(WebRequestFailureEventArgs.EventId, OnWebRequestFailure);

            //可更新模式检查版本信息,否则直接初始化资源,
            if (GameEntry.Resource.ResourceMode == ResourceMode.Updatable)
            {
                RequestVersion();
            }
            else
            {
                GameEntry.Resource.InitResources(OnInitResourcesComplete);
            }
        }
 /// <summary>
 /// 使用可更新模式并更新版本资源列表。
 /// </summary>
 /// <param name="versionListLength">版本资源列表大小。</param>
 /// <param name="versionListHashCode">版本资源列表哈希值。</param>
 /// <param name="versionListZipLength">版本资源列表压缩后大小。</param>
 /// <param name="versionListZipHashCode">版本资源列表压缩后哈希值。</param>
 /// <param name="updateVersionListCallbacks">版本资源列表更新回调函数集。</param>
 public void UpdateVersionList(int versionListLength, int versionListHashCode, int versionListZipLength, int versionListZipHashCode, UpdateVersionListCallbacks updateVersionListCallbacks)
 {
     m_ResourceManager.UpdateVersionList(versionListLength, versionListHashCode, versionListZipLength, versionListZipHashCode, updateVersionListCallbacks);
 }
Beispiel #5
0
 /// <summary>
 /// 使用可更新模式并更新版本资源列表。
 /// </summary>
 /// <param name="versionListLength">版本资源列表大小。</param>
 /// <param name="versionListHashCode">版本资源列表哈希值。</param>
 /// <param name="versionListZipLength">版本资源列表压缩后大小。</param>
 /// <param name="versionListZipHashCode">版本资源列表压缩后哈希值。</param>
 /// <param name="updateVersionListCallbacks">版本资源列表更新回调函数集。</param>
 public void UpdateVersionList(int versionListLength, int versionListHashCode, int versionListZipLength, int versionListZipHashCode, UpdateVersionListCallbacks updateVersionListCallbacks)
 {
     throw new NotSupportedException("UpdateVersionList");
 }
Beispiel #6
0
 public void UpdateVersionList(int versionListLength, int versionListHashCode, int versionListZipLength, int versionListZipHashCode, UpdateVersionListCallbacks updateVersionListCallbacks)
 {
     //throw new NotImplementedException();
 }
Beispiel #7
0
 /// <summary>
 /// 使用可更新模式并更新版本资源列表。
 /// </summary>
 /// <param name="versionListLength">版本资源列表大小。</param>
 /// <param name="versionListHashCode">版本资源列表哈希值。</param>
 /// <param name="versionListZipLength">版本资源列表压缩后大小。</param>
 /// <param name="versionListZipHashCode">版本资源列表压缩后哈希值。</param>
 /// <param name="updateVersionListCallbacks">版本资源列表更新回调函数集。</param>
 public void UpdateVersionList(int versionListLength, int versionListHashCode, int versionListZipLength, int versionListZipHashCode, UpdateVersionListCallbacks updateVersionListCallbacks)
 {
     ResourceComponent.This.UpdateVersionList(versionListLength, versionListHashCode, versionListZipLength, versionListZipHashCode, updateVersionListCallbacks);
 }