Example #1
0
 public void Tick(float deltaTime)
 {
     if (CurLoader == null)
     {
         if (ReadyLoaders.Count > 0)
         {
             CurLoader = ReadyLoaders[0];
             ReadyLoaders.RemoveAt(0);
             CurLoader.Get();
         }
     }
     if (CurLoader != null)
     {
         if (CurLoader.IsDone)
         {
             CurLoader = null;
         }
     }
 }
Example #2
0
        public void Remove(Asset loader)
        {
            string url   = loader.Url;
            int    index = -1;

            for (int i = 0; i < ReadyLoaders.Count; i++)
            {
                if (ReadyLoaders[i].Url == url)
                {
                    index = i; break;
                }
            }
            if (index != -1)
            {
                Asset oLoader = ReadyLoaders[index];
                ReadyLoaders.RemoveAt(index);
            }
            if (CurLoader != null && CurLoader.Url == url)
            {
                CurLoader.Dispose();
                CurLoader = null;
            }
        }
Example #3
0
 private MouseCursor LoadCustomCursor(string path)
 {
     return(CurLoader.LoadMonoCursor(GD, File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read)));
 }
Example #4
0
 private MouseCursor[] LoadUpgradeCursors(string path, int maxStars)
 {
     return(CurLoader.LoadUpgradeCursors(GD, File.Open(path, FileMode.Open, FileAccess.Read, FileShare.Read), maxStars));
 }