Exemplo n.º 1
0
        protected void ClearScreen()
        {
            if (_activePage)
            {
                _activePage.Hide();
                GameState.ReleaseGlobalPause(_activePage.name);

                if (_activePage != _hudPage)
                {
                    Destroy(_activePage.gameObject);
                }
            }
            _activePage = null;
        }
Exemplo n.º 2
0
 private void SimpleClosePage(Page page)
 {
     activePage.Remove(page);
     page.Hide();
     foreach (Texture2D ua in page.atlasOfPage)
     {
         bool cannotUnload = false;
         foreach (Page p in activePage)
         {
             foreach (Texture2D uia in p.atlasOfPage)
             {
                 if (uia == ua)
                 {
                     cannotUnload = true;
                     break;
                 }
             }
             if (cannotUnload)
             {
                 break;
             }
         }
         if (ua != null)
         {
             if (!cannotUnload && alwaysInMemoryAtlas.IndexOf(ua.name) == -1)
             {
                 Resources.UnloadAsset(ua);
             }
         }
     }
     if (!page.alwaysInMemery)
     {
         pageDictonary.Remove(page.name);
         Destroy(page.gameObject);
     }
     //AssetLoad.ResourceManager.Instance.UnloadUnusedResources();
 }