Beispiel #1
0
    private void ShowBackImage(Adventure adventure)
    {
        if (adventure != null)
        {
            this.m_Name.Text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(adventure.GetAdventureName());

            string    backImage = adventure.GetBackImage();
            Texture2D texture   = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(backImage);

            if (null != texture)
            {
                this.m_BackImage.SetTexture(texture);
            }
            else
            {
                string  str     = string.Format("UI/Adventure/{0}{1}", backImage, NrTSingleton <UIDataManager> .Instance.AddFilePath);
                WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName);
                wWWItem.SetItemType(ItemType.USER_ASSETB);
                wWWItem.SetCallback(new PostProcPerItem(this.SetBackImage), backImage);
                TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true);
            }
        }
    }