Пример #1
0
    private void NextDownlaod()
    {
        int run_cunt = 0;

        for (int i = 0; i < children.Count; i++)
        {
            if (MAX_PARALLEL_DOWNLOAD <= run_cunt)
            {
                return;
            }

            AssetBundler ab = children[i];

            if (ab.IsSuccess)
            {
                continue;
            }

            if (ab.IsError)
            {
                continue;
            }

            if (ab.IsWait)
            {
                run_cunt++;
                continue;
            }

            if (ab.IsFail)
            {
                ab.Retry();
                run_cunt++;
                continue;
            }

            if (ab.IsReady)
            {
                ab.Load();
                run_cunt++;
                continue;
            }
        }
    }