public static NkUtil.REQUEST_CHAR_TEXTURE_INFO RequestCharTexture(eCharImageType type, int kind, int solgrade, NkUtil.RequestCharPortraitCallback callbackDelegate, string costume = "") { NkUtil.REQUEST_CHAR_TEXTURE_INFO result = default(NkUtil.REQUEST_CHAR_TEXTURE_INFO); string text = MsgHandler.HandleReturn <string>("PortraitFileName", new object[] { kind, solgrade }); if (string.Empty == text) { return(result); } if (!string.IsNullOrEmpty(costume)) { string text2 = MsgHandler.HandleReturn <string>("PortraitCostumeFileName", new object[] { kind, solgrade, costume }); if (!string.IsNullOrEmpty(text2)) { text = text2; } } if (type == eCharImageType.SMALL) { result._imageKey = text + "_64"; } else if (type == eCharImageType.MIDDLE) { result._imageKey = text + "_256"; } else if (type == eCharImageType.LARGE) { if (UIDataManager.IsUse256Texture()) { result._imageKey = text + "_256"; } else { result._imageKey = text + "_512"; } } result._tex2D = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(result._imageKey); if (result._tex2D != null) { return(result); } object[] callBackParam = new object[] { callbackDelegate, result._imageKey }; NrTSingleton <UIImageBundleManager> .Instance.RequestCharImageCustomParam(result._imageKey, type, new PostProcPerItem(NkUtil.CharPortraitBundleCallback), callBackParam); return(result); }
public void SetTexture(string charCode) { int charKindByCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindByCode(charCode); string costumePortraitInBattleSoldier = this.GetCostumePortraitInBattleSoldier(charKindByCode); this._requestCharPortraitInfo = NkUtil.RequestCharTexture(eCharImageType.LARGE, charKindByCode, -1, new NkUtil.RequestCharPortraitCallback(this.CharPortraitBundleCallback), costumePortraitInBattleSoldier); this.SetCharPortrait(this._requestCharPortraitInfo._tex2D); }