Exemple #1
0
 IEnumerator LoadingProcess(string _key, Iloading type)
 {
     DownloadManager.instance.ClearPosts();
     yield return(StartCoroutine(DownloadManager.instance.Downloading(_key, type)));
     //yield return StartCoroutine(AtlasController.instance.Init(DownloadManager.instance.GetPosts()));
     //DownloadManager.instance.ClearPosts();
 }
Exemple #2
0
    public IEnumerator Downloading(string key, Iloading _loading)
    {
        Resources.UnloadUnusedAssets();
        _tempPosts = new root_posts();

        Iloading loading = _loading;

        //checking witch account to load
        yield return(StartCoroutine(loading.Loading(key)));

        //handlers
        if (loading.isContainErrors())
        {
            ErrorHandler?.Invoke(LocalizationManager.instance.GetLocalizedValue(loading.GetPosts().AccountKey));
        }
        else
        {
            _tempPosts = loading.GetPosts();
            ConvertTexturesToSprites();
            yield return(new WaitForEndOfFrame());

            SuccessfullHandler?.Invoke("Account successful loaded");
        }
    }