예제 #1
0
        public override IEnumerator Run()
        {
            string    path = Application.temporaryCachePath + "/" + this.cacheKey;
            Texture2D tex  = null;

            if (File.Exists(path))
            {
                tex          = FileHelper.LoadCacheTextureFromFile(path);
                tex.wrapMode = TextureWrapMode.Clamp;
            }
            try
            {
                if (this.callback != null)
                {
                    this.callback(tex);
                }
            }
            catch (Exception)
            {
                FMLogger.LogError("never should happen");
            }
            yield return(0);

            yield break;
        }
예제 #2
0
        public override IEnumerator Run()
        {
            Texture2D tex = null;

            try
            {
                tex          = FileHelper.LoadTextureFromFile(this.path);
                tex.wrapMode = TextureWrapMode.Clamp;
            }
            catch (Exception)
            {
                FMLogger.LogError("tex not found: " + this.path);
            }
            try
            {
                if (this.callback != null)
                {
                    this.callback(tex);
                }
            }
            catch (Exception)
            {
                FMLogger.LogError("never should happen");
            }
            yield return(0);

            yield break;
        }
예제 #3
0
 private void OnError(Gameboard.LoadError error)
 {
     if (!AdsManager.Instance.HasBannerPlacement(BannerPlacement.Menu))
     {
         AdsManager.Instance.HideBanner(true);
     }
     if (error == Gameboard.LoadError.Unknown)
     {
         FMLogger.LogError("***Unknown error during gb loading");
     }
     else
     {
         FMLogger.LogError("*** " + error + " error during gb loading");
         SharedData.Instance.DeletePictureData(Gameboard.pictureData);
     }
     this.sceneLoader.LoadSceneImmediate(SceneName.menu);
 }