Example #1
0
    IEnumerator LoadResourceAll(List<string> allResName, OnResourcesLoadedCallback callBackOn,
        BeforeResourcesLoadedCallback callBackBefore, AfterResourcesLoadedCallback callBackAfter)
    {
        if (callBackBefore != null)
            callBackBefore();

        for (int i = 0; i < allResName.Count; i++)
            yield return StartCoroutine(LoadResource(allResName[i], callBackOn));

        if (callBackBefore != null)
            callBackBefore();
    }
Example #2
0
 public void StartLoadResources(List<string> allResName, OnResourcesLoadedCallback callBackOn, BeforeResourcesLoadedCallback callBackBefore, AfterResourcesLoadedCallback callBackAfter)
 {
     StartCoroutine(LoadResourceAll(allResName, callBackOn, callBackBefore, callBackAfter));
 }