public void SetCharFace(Transform CharFace, int CHARKIND) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(CHARKIND); if (charKindInfo == null) { return; } CharChangeMainDlg.m_strBuilder.Remove(0, CharChangeMainDlg.m_strBuilder.Length); if (CHARKIND % 2 == 1) { CharChangeMainDlg.m_strBuilder.Append(string.Format("UI/CharSelect/{0}male{1}", charKindInfo.GetCHARKIND_INFO().CharTribe, NrTSingleton <UIDataManager> .Instance.AddFilePath)); } else { CharChangeMainDlg.m_strBuilder.Append(string.Format("UI/CharSelect/{0}female{1}", charKindInfo.GetCHARKIND_INFO().CharTribe, NrTSingleton <UIDataManager> .Instance.AddFilePath)); } Texture2D texture2D = ResourceCache.GetResource(CharChangeMainDlg.m_strBuilder.ToString()) as Texture2D; if (null == texture2D) { CharChangeMainDlg.RequestDownload(CharChangeMainDlg.m_strBuilder.ToString(), new PostProcPerItem(CharChangeMainDlg._OnImageProcessFace), CharFace.gameObject); } else { CharChangeMainDlg.SetCharFaceTexture(CharFace.gameObject, texture2D); } }
public void SetMainTexture(E_CHAR_TRIBE eCharTribe) { string text = string.Empty; switch (eCharTribe) { case E_CHAR_TRIBE.HUMAN: case E_CHAR_TRIBE.HUMANF: text = string.Format("UI/charselect/HumanBG" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); break; case E_CHAR_TRIBE.FURRY: text = string.Format("UI/charselect/FurryBG" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); break; case E_CHAR_TRIBE.ELF: text = string.Format("UI/charselect/FairyBG" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); break; } if (string.Empty != text) { Texture2D texture2D = ResourceCache.GetResource(text) as Texture2D; if (null == texture2D) { CharChangeMainDlg.RequestDownload(text, new PostProcPerItem(CharChangeMainDlg._OnImageProcess), this.m_dtMainBG); } else { CharChangeMainDlg.SetTexture(this.m_dtMainBG, texture2D); } } }
public override void SetComponent() { this.m_eCharTribeList = new E_CHAR_TRIBE[4]; this.m_dtMainBG = (base.GetControl("DrawTexture_DrawTexture26") as DrawTexture); this.m_dtCharBG = (base.GetControl("BT_DrawTexture25") as DrawTexture); this.m_dtShadowBG = (base.GetControl("BT_DrawTexture_CharShadow1") as DrawTexture); string text = string.Format("UI/charselect/ChShadow" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); Texture2D texture2D = ResourceCache.GetResource(text) as Texture2D; if (null == texture2D) { CharChangeMainDlg.RequestDownload(text, new PostProcPerItem(CharChangeMainDlg._OnImageProcess), this.m_dtShadowBG); } else { CharChangeMainDlg.SetTexture(this.m_dtShadowBG, texture2D); } this.m_btPrev = (base.GetControl("BT_Back") as Button); this.m_btPrev.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickPrev)); this.m_btNext = (base.GetControl("BT_Next") as Button); this.m_btNext.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickNext)); this.m_lbClass = (base.GetControl("LB_Title") as Label); this.m_dtWeapon1 = (base.GetControl("DT_Weapon01") as DrawTexture); this.m_dtWeapon2 = (base.GetControl("DT_Weapon02") as DrawTexture); this.m_lbInfo = (base.GetControl("LB_Info") as Label); this.m_btMovie = (base.GetControl("BT_Movie") as Button); this.m_btMovie.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickMovie)); this.m_dtSkillIcon1 = (base.GetControl("DT_SkillIcon01") as DrawTexture); this.m_lbSkillName1 = (base.GetControl("LB_SkillName01") as Label); this.m_dtSkillIcon2 = (base.GetControl("DT_SkillIcon02") as DrawTexture); this.m_lbSkillName2 = (base.GetControl("LB_SkillName02") as Label); this.m_lbMoney = (base.GetControl("LB_Gold") as Label); charSpend charSpend = NrTSingleton <NrBaseTableManager> .Instance.GetCharSpend(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel().ToString()); if (charSpend != null) { this.m_lNeedMoney = charSpend.lCharChangeGold; } this.m_lbMoney.SetText(ANNUALIZED.Convert(this.m_lNeedMoney)); this.m_btBack = (base.GetControl("Button_Button15") as Button); this.m_btBack.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickBack)); this.m_btChange = (base.GetControl("BT_Change") as Button); this.m_btChange.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickChange)); this.m_eCharTribeList[0] = E_CHAR_TRIBE.FURRY; this.m_eCharTribeList[1] = E_CHAR_TRIBE.ELF; this.m_eCharTribeList[2] = E_CHAR_TRIBE.HUMAN; this.m_eCharTribeList[3] = E_CHAR_TRIBE.HUMANF; base.SetScreenCenter(); }
public override void SetComponent() { this.m_dtCharBG = new DrawTexture[4]; this.m_btSelect = new Button[4]; this.m_btDetail = new Button[4]; this.m_dtShadowBG = new DrawTexture[4]; string text = string.Empty; this.m_dtMaingBG = (base.GetControl("BT_DrawTexture_DrawTexture22") as DrawTexture); Texture2D texture2D; for (int i = 0; i < 4; i++) { text = string.Format("BT_DrawTexture_CharBG{0}", (i + 1).ToString()); this.m_dtCharBG[i] = (base.GetControl(text) as DrawTexture); text = string.Format("BT_Select0{0}", (i + 1).ToString()); this.m_btSelect[i] = (base.GetControl(text) as Button); this.m_btSelect[i].AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSelect)); text = string.Format("BT_Detail0{0}", (i + 1).ToString()); this.m_btDetail[i] = (base.GetControl(text) as Button); this.m_btDetail[i].AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickDetail)); text = string.Format("BT_DrawTexture_CharShadow{0}", (i + 1).ToString()); this.m_dtShadowBG[i] = (base.GetControl(text) as DrawTexture); text = string.Format("UI/charselect/ChShadow" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); texture2D = (ResourceCache.GetResource(text) as Texture2D); if (null == texture2D) { CharChangeMainDlg.RequestDownload(text, new PostProcPerItem(CharChangeMainDlg._OnImageProcess), this.m_dtShadowBG[i]); } else { CharChangeMainDlg.SetTexture(this.m_dtShadowBG[i], texture2D); } } this.m_dtSelect = (base.GetControl("DT_Select01") as DrawTexture); this.m_dtSelect.Hide(true); this.m_btSelect[0].TabIndex = 2; this.m_btSelect[1].TabIndex = 3; this.m_btSelect[2].TabIndex = 1; this.m_btSelect[3].TabIndex = 4; this.m_btDetail[0].TabIndex = 2; this.m_btDetail[1].TabIndex = 3; this.m_btDetail[2].TabIndex = 1; this.m_btDetail[3].TabIndex = 4; this.m_lbMoney = (base.GetControl("LB_Gold") as Label); charSpend charSpend = NrTSingleton <NrBaseTableManager> .Instance.GetCharSpend(NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetLevel().ToString()); if (charSpend != null) { this.m_lNeedMoney = charSpend.lCharChangeGold; } this.m_lbMoney.SetText(ANNUALIZED.Convert(this.m_lNeedMoney)); this.m_HelpButton = (base.GetControl("Help_Button") as Button); this.m_HelpButton.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickHelp)); this.m_btChange = (base.GetControl("BT_Change") as Button); this.m_btChange.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickChange)); text = string.Format("UI/charselect/ChaSelect_BG" + NrTSingleton <UIDataManager> .Instance.AddFilePath, new object[0]); texture2D = (ResourceCache.GetResource(text) as Texture2D); if (null == texture2D) { CharChangeMainDlg.RequestDownload(text, new PostProcPerItem(CharChangeMainDlg._OnImageProcess), this.m_dtMaingBG); } else { CharChangeMainDlg.SetTexture(this.m_dtMaingBG, texture2D); } CharChangeMainDlg.SetCharImage(this.m_dtCharBG[0], 3); CharChangeMainDlg.SetCharImage(this.m_dtCharBG[1], 6); CharChangeMainDlg.SetCharImage(this.m_dtCharBG[2], 1); CharChangeMainDlg.SetCharImage(this.m_dtCharBG[3], 2); base.SetScreenCenter(); }