Beispiel #1
0
        private async Task <bool> DownloadAssets()
        {
            var res = await GamesManager.Get.getGamebyId(GamesManager.GAME_ID);

            if (res != null)
            {
                LoaderManager.Get.LoaderController.ShowLoader(LoaderManager.DONWLOADING);
                await BackgroundController.SaveBackgroundImage(GamesManager.BACKGROUND_IMAGE_URL);

                await GamesManager.SaveIcon(GamesManager.ICON_URL);

                LoaderManager.Get.LoaderController.ShowLoader(LoaderManager.SETTING_LANGUAGE);
                await TranslationManager.SavePreferedLanguage();

                LoaderManager.Get.LoaderController.HideLoader();
                return(true);
            }
            else
            {
                Debug.LogError("Please verify your game ID");
                Debug.Break();
                LoaderManager.Get.LoaderController.HideLoader();
                return(false);
            }
        }