Example #1
0
        /// <summary>
        /// 使用单机模式并初始化资源。
        /// </summary>
        /// <param name="initResourcesCompleteCallback">使用单机模式并初始化资源完成的回调函数。</param>
        public void InitResources(InitResourcesCompleteCallback initResourcesCompleteCallback)
        {
            if (initResourcesCompleteCallback == null)
            {
                throw new GameFrameworkException("Init resources complete callback is invalid.");
            }

            if (m_ResourceMode == ResourceMode.Unspecified)
            {
                throw new GameFrameworkException("You must set resource mode first.");
            }

            if (m_ResourceMode != ResourceMode.Package)
            {
                throw new GameFrameworkException("You can not use InitResources without package resource mode.");
            }

            if (m_ResourceIniter == null)
            {
                throw new GameFrameworkException("You can not use InitResources at this time.");
            }

            m_RefuseSetCurrentVariant       = true;
            m_InitResourcesCompleteCallback = initResourcesCompleteCallback;
            m_ResourceIniter.InitResources(m_CurrentVariant);
        }
Example #2
0
        /// <summary>
        /// 使用单机模式并初始化资源。
        /// </summary>
        public void InitResources()
        {
            m_ResourceIniter = new ResourceIniter(this);
            m_ResourceIniter.ResourceInitComplete += OnIniterResourceInitComplete;

            m_RefuseSetCurrentVariant = true;
            m_ResourceIniter.InitResources(m_CurrentVariant);
        }
Example #3
0
        /// <summary>
        /// 使用单机模式并初始化资源。
        /// </summary>
        public void InitResources()
        {
            if (m_ResourceMode == ResourceMode.Unspecified)
            {
                throw new AshException("You must set resource mode first.");
            }

            if (m_ResourceMode != ResourceMode.Package)
            {
                throw new AshException("You can not use InitResources without package resource mode.");
            }

            if (m_ResourceIniter == null)
            {
                throw new AshException("You can not use InitResources at this time.");
            }

            m_RefuseSetCurrentVariant = true;
            m_ResourceIniter.InitResources(m_CurrentVariant);
        }
Example #4
0
 public void InitResources()
 {
     m_ResourceIniter.InitResources(m_CurrentVariant);
 }