Example #1
0
 public override bool IsEnable()
 {
     if (null == mRefPck)
     {
         return(false);
     }
     return(mRefPck.IsDone());
 }
Example #2
0
 public bool IsAllKeepAlivePackageLoaded()
 {
     for (int i = 0; i < m_keepAlivePackage.Count; i++)
     {
         string    pkgName    = m_keepAlivePackage[i];
         ResPackge cfgPackage = GetPackge(pkgName);
         if (cfgPackage != null)
         {
             if (!cfgPackage.IsDone())
             {
                 return(false);
             }
         }
     }
     return(true);
 }
Example #3
0
    public void AddKeepAlivePackage(string package, bool startOpenImm = true)
    {
        for (int i = 0; i < m_keepAlivePackage.Count; i++)
        {
            if (m_keepAlivePackage[i] == package)
            {
                return;
            }
        }
        ResPackge pack = GetPackge(package);

        if (pack != null)
        {
            pack.m_isKeepAlive = true;
            m_keepAlivePackage.Add(package);
            if (!pack.IsDone() && startOpenImm)
            {
                mEntry.StartCoroutine(pack.TryDownload(false, false));
            }
        }
    }