Esempio n. 1
0
 public static MissionBannerCacheBuffer Instance()
 {
     if (MissionBannerCacheBuffer.instance == null)
     {
         MissionBannerCacheBuffer.instance = new MissionBannerCacheBuffer(2);
     }
     return(MissionBannerCacheBuffer.instance);
 }
    private IEnumerator DownloadBannerTexture(string name)
    {
        this.failedTextLabel.gameObject.SetActive(true);
        this.failedTextLabel.text = name;
        int _type = int.Parse(this.data.displayGroup);

        CMD_Mission.MissionType type = (CMD_Mission.MissionType)_type;
        string path = string.Empty;

        switch (type)
        {
        case CMD_Mission.MissionType.Daily:
            path = "mission_daily";
            break;

        case CMD_Mission.MissionType.Total:
            path = "mission_total";
            break;

        case CMD_Mission.MissionType.Beginner:
            path = "mission_beginner";
            break;

        case CMD_Mission.MissionType.Midrange:
            path = "mission_midrange";
            break;
        }
        path = "MissionBanner/" + path;
        MissionBannerCacheBuffer.Instance().LoadAndCacheObj(path, delegate(UnityEngine.Object obj)
        {
            if (obj != null)
            {
                Texture2D mainTexture     = obj as Texture2D;
                this.failedTextLabel.text = string.Empty;
                this.failedTextLabel.gameObject.SetActive(false);
                this.bannerTex.mainTexture = mainTexture;
            }
        });
        yield return(null);

        yield break;
    }
Esempio n. 3
0
    public static void ReloadMaster()
    {
        DirectoryInfo directoryInfo = new DirectoryInfo(Application.persistentDataPath);

        foreach (FileInfo fileInfo in directoryInfo.GetFiles())
        {
            string name = fileInfo.Name;
            if (name.StartsWith("MA_"))
            {
                File.Delete(Application.persistentDataPath + "/" + name);
            }
        }
        MasterDataMng.Instance().ClearCache();
        MissionBannerCacheBuffer.ClearCacheBuffer();
        MonsterIconCacheBuffer.ClearCacheBuffer();
        PresentBoxItemIconCacheBuffer.ClearCacheBuffer();
        TitleIconCacheBuffer.ClearCacheBuffer();
        StringMaster.Reload();
        AlertMaster.Reload();
    }
Esempio n. 4
0
 public static void ClearCacheBuffer()
 {
     MissionBannerCacheBuffer.instance = null;
 }