Beispiel #1
0
        //-------∽-★-∽------∽-★-∽--------∽-★-∽数据操作∽-★-∽--------∽-★-∽------∽-★-∽--------//

        protected override LoadReq ExcuteLoad(LoadReq req_)
        {
            LoadReq req = req_;
            AbstractLoader loader = LoaderFactory.GetLoader(req_.type);
            
            req = loader.LoadAsync(req);
            if (loader.isDone)
            {
                LoaderFactory.CloseLoader(loader);
                return req;
            }

            req.OnStart();

            //m_isAsync = isAsync_;
            //m_progress = 0;
            //m_data = null;
            //m_errorStr = null;

            m_isOpen = true;
            m_done = false;
            m_loading = true;

            m_loaders.Add(loader);
            SchUpdate(true);

            //__print("○load start: " + loader.UrlStr);
            NotifyAsynEvt(LOAD_EVT.START, req);

            return req;
        }
Beispiel #2
0
        //-------∽-★-∽------∽-★-∽--------∽-★-∽数据管理∽-★-∽--------∽-★-∽------∽-★-∽--------//


        override protected void Step(float delta_)
        {

            tmp_b = true;
            for (int i = m_loaders.Count-1; i >=0 ; --i)
            {
                tmp_loader = m_loaders[i];
                if (tmp_loader.isDone)
                {
                    LoaderFactory.CloseLoader(tmp_loader);
                    m_loaders.RemoveAt(i);
                }
                else
                {
                    tmp_b = false;
                }
            }

            tmp_loader = null;

            if (tmp_b)
            {
                OnComplete();
            }

        }
Beispiel #3
0
        void LoadOne()
        {
            LoadReq req_ = m_loadReqQue.load_reqs[m_load_idx];

            if (m_loader == null || m_loader.Req.type != req_.type)
            {
                LoaderFactory.CloseLoader(m_loader);
                m_loader = LoaderFactory.GetLoader(req_.type);
            }

            m_loader.LoadAsync(req_);

            CheckLoaded();
        }
Beispiel #4
0
 protected override void __Stop()
 {
     if (m_loaders.Count > 0)
     {
         for (int i=0; i < m_loaders.Count; ++i)
         {
             tmp_loader = m_loaders[i];
             LoaderFactory.CloseLoader(tmp_loader);
         }
         m_loaders.Clear();
     }
     
     SchUpdate(false);
 }
Beispiel #5
0
 protected override void __Stop()
 {
     LoaderFactory.CloseLoader(m_loader);
     m_loader = null;
     SchUpdate(false);
 }
Beispiel #6
0
 protected void CloseLoader(AbstractLoader loader_)
 {
     LoaderFactory.CloseLoader(loader_);
 }