示例#1
0
    public IEnumerator Load(string source, Func <T, IEnumerator> finish = null, Action <string> error = null, Action <float, string> progress = null)
    {
        finishLoad   = finish;
        errorLoad    = error;
        progressLoad = progress;
        cacheSource  = CacheFileLoader.CacheStreamKey(source);
        isInProgress = true;

        yield return(childLoader.Load(source));
    }
示例#2
0
    public override IEnumerator BeforeLoad(string source)
    {
        //create query string from url
        memoryKey = CacheFileLoader.CacheStreamKey(source);


        //query from image dictionary
        //if we have a texture with this key
        //we can take it and break;
        if (memoryData.ContainsKey(memoryKey))
        {
            InnerFinishLoad(memoryData[memoryKey]);
            yield break;
        }
    }