public void SetList(SOLDIER_INFO[] _solArray, string _itemName) { this.nowIndex = 0; this.lb_Title.SetText(_itemName); this.textureAllLoad.Clear(); this.isStartTextureLoad = true; this.solArray = _solArray; for (int i = 0; i < _solArray.Length; i++) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.solArray[i].CharKind); if (charKindInfo == null) { return; } NewListItem newListItem = new NewListItem(this.nlb_CardArea1.ColumnNum, true, string.Empty); newListItem.SetListItemData(1, "Win_I_WorrGradeS" + this.solArray[i].Grade, null, null, null); string imageKey; if (UIDataManager.IsUse256Texture()) { imageKey = charKindInfo.GetPortraitFile1((int)this.solArray[i].Grade, string.Empty) + "_256"; } else { imageKey = charKindInfo.GetPortraitFile1((int)this.solArray[i].Grade, string.Empty) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(imageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(imageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); this.textureAllLoad.Enqueue(true); } } }
private void SetTextureBundle() { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_i32SelectCharKind); if (charKindInfo == null) { return; } if (UIDataManager.IsUse256Texture()) { this.FaceImageKey = charKindInfo.GetPortraitFile1((int)(this.m_bSelectGrade - 1), string.Empty) + "_256"; } else { this.FaceImageKey = charKindInfo.GetPortraitFile1((int)(this.m_bSelectGrade - 1), string.Empty) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.FaceImageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.FaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } if (this.bLegend) { this.RankImageKey = "rankl" + this.m_bSelectGrade.ToString(); } else { this.RankImageKey = "rank" + this.m_bSelectGrade.ToString(); } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.RankImageKey)) { string str = string.Format("{0}", "UI/Soldier/" + this.RankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.SetBundleImage), this.RankImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); } this.SeasonImageKey = "font_number" + this.m_bSelectSeason.ToString(); if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.SeasonImageKey)) { string str2 = string.Format("{0}", "UI/Soldier/" + this.SeasonImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem2 = Holder.TryGetOrCreateBundle(str2 + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem2.SetItemType(ItemType.USER_ASSETB); wWWItem2.SetCallback(new PostProcPerItem(this.SetBundleImage), this.SeasonImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem2, DownGroup.RUNTIME, true); } if (this.bLegend) { this.CardFrameImageKey = "card_legend"; if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.CardFrameImageKey)) { string str3 = string.Format("{0}", "UI/Soldier/" + this.CardFrameImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem3 = Holder.TryGetOrCreateBundle(str3 + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem3.SetItemType(ItemType.USER_ASSETB); wWWItem3.SetCallback(new PostProcPerItem(this.SetBundleImage), this.CardFrameImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem3, DownGroup.RUNTIME, true); } } this.eBUNDLEDOWN = SolElementSuccessDlg.eBUNDLEDOWNSTATE.eBUNDLE_DOWNING; }
public void SetSolInfo(int nCharKind) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nCharKind); if (charKindInfo == null) { return; } NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.SetCharKind(nCharKind); nkSoldierInfo.SetLevel(1); this.m_lbName.SetText(nkSoldierInfo.GetName()); string textureFromBundle = string.Empty; if (UIDataManager.IsUse256Texture()) { textureFromBundle = "UI/Soldier/256/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_256"; } else { textureFromBundle = "UI/Soldier/512/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_512"; } this.m_dwSolFace.SetTextureFromBundle(textureFromBundle); if (charKindInfo.GetWeaponType() > 0) { this.m_dwWeaphonIcon.SetTexture(string.Format("Win_I_Weapon{0}", charKindInfo.GetWeaponType().ToString())); } int battleSkillUnique = charKindInfo.GetBattleSkillUnique(0); BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(battleSkillUnique); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillUnique, 1); if (battleSkillBase == null || battleSkillDetail == null) { return; } if (battleSkillBase.m_nColosseumSkillDesc > 0) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_nColosseumSkillDesc.ToString()); if (textFromInterface != string.Empty) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint }); this.m_lbSkillDesc.SetText(empty); } } this.Show(); }
public void SetSummonEffect(int nKind) { if (this.m_goSummonEffect != null) { UnityEngine.Object.Destroy(this.m_goSummonEffect); this.m_goSummonEffect = null; this.m_fSummonEndTime = 0f; } NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nKind); if (charKindInfo == null) { return; } if (Battle.BATTLE.ColosseumRecall == null) { return; } this.m_goSummonEffect = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.ColosseumRecall, Vector3.zero, Quaternion.identity); NkUtil.SetAllChildLayer(this.m_goSummonEffect, GUICamera.UILayer); Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); this.m_goSummonEffect.transform.position = effectUIPos; if (UIDataManager.IsUse256Texture()) { this.faceImageKey = charKindInfo.GetPortraitFile1(0, string.Empty) + "_256"; } else { this.faceImageKey = charKindInfo.GetPortraitFile1(0, string.Empty) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.faceImageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.faceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } this.m_bSetFace = false; Animation componentInChildren = this.m_goSummonEffect.GetComponentInChildren <Animation>(); if (componentInChildren != null) { this.m_fSummonEndTime = Time.realtimeSinceStartup + componentInChildren.clip.length; } else { this.m_fSummonEndTime = Time.realtimeSinceStartup + 1.5f; } this.m_goSummonEffect.SetActive(false); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_goKillEffect); } TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "COLOSSEUM", "BATTLECALL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); }
public void ShowList(int _index) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.solArray[_index].CharKind); if (charKindInfo == null) { return; } string imageKey; if (UIDataManager.IsUse256Texture()) { imageKey = charKindInfo.GetPortraitFile1((int)this.solArray[_index].Grade, string.Empty) + "_256"; } else { imageKey = charKindInfo.GetPortraitFile1((int)this.solArray[_index].Grade, string.Empty) + "_512"; } NewListItem newListItem = new NewListItem(this.nlb_CardArea1.ColumnNum, true, string.Empty); newListItem.SetListItemData(0, this._backBG, null, null, null, null); for (int i = 1; i <= 6; i++) { newListItem.SetListItemData(i, false); } newListItem.SetListItemData((int)(this.solArray[_index].Grade + 1), true); Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(imageKey); newListItem.SetListItemData(7, texture, null, null, null, null); string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1208"), "count", charKindInfo.GetSeason(this.solArray[_index].Grade) + 1 }); newListItem.SetListItemData(8, empty, null, null, null); newListItem.SetListItemData(9, true); newListItem.SetListItemData(10, true); newListItem.SetListItemData(11, charKindInfo.GetName(), null, null, null); if (_index < 6) { this.nlb_CardArea1.Add(newListItem); this.nlb_CardArea1.RepositionItems(); } else { this.nlb_CardArea2.Add(newListItem); this.nlb_CardArea2.RepositionItems(); } }
private string GetFaceImageKey(SOLDIER_INFO _solInfo) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(_solInfo.CharKind); string result; if (UIDataManager.IsUse256Texture()) { result = charKindInfo.GetPortraitFile1((int)_solInfo.Grade, string.Empty) + "_256"; } else { result = charKindInfo.GetPortraitFile1((int)_solInfo.Grade, string.Empty) + "_512"; } return(result); }
public void MakeBattleCharInfo(short nBUID) { NkBattleChar charByBUID = NrTSingleton <NkBattleCharManager> .Instance.GetCharByBUID(nBUID); if (charByBUID != null) { if (charByBUID.GetBUID() <= -1) { return; } ColosseumObserverControlDlg.OBSERVER_SOLDIERINFO obSoldierInfo = this.GetObSoldierInfo(charByBUID.Ally, charByBUID.GetBUID()); if (obSoldierInfo == null) { return; } if (obSoldierInfo.m_nBUID == -1) { NrCharKindInfo charKindInfo = charByBUID.GetCharKindInfo(); if (charKindInfo == null) { return; } string textureFromBundle = string.Empty; textureFromBundle = "UI/Soldier/64/" + charKindInfo.GetPortraitFile1(0, string.Empty) + "_64"; obSoldierInfo.m_itSol.SetTextureFromBundle(textureFromBundle); obSoldierInfo.m_nBUID = charByBUID.GetBUID(); obSoldierInfo.m_dtQuestion.Visible = false; obSoldierInfo.m_fMaxHP = (float)charByBUID.GetMaxHP(false); this.UpdateHP(charByBUID.Ally, charByBUID.GetBUID(), (float)charByBUID.GetSoldierInfo().GetHP(), 0, false); this.SetEnableTurn(charByBUID.Ally, charByBUID.GetBUID(), charByBUID.GetTurnState() != eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_DISABLE); } } }
public void MakeAllBattleCharInfo() { NkBattleChar[] charArray = NrTSingleton <NkBattleCharManager> .Instance.GetCharArray(); for (int i = 0; i < charArray.Length; i++) { NkBattleChar nkBattleChar = charArray[i]; if (nkBattleChar != null) { if (nkBattleChar.GetBUID() > -1) { ColosseumObserverControlDlg.OBSERVER_SOLDIERINFO obSoldierInfo = this.GetObSoldierInfo(nkBattleChar.Ally, nkBattleChar.GetBUID()); if (obSoldierInfo != null) { if (obSoldierInfo.m_nBUID == -1) { NrCharKindInfo charKindInfo = nkBattleChar.GetCharKindInfo(); if (charKindInfo != null) { string textureFromBundle = string.Empty; textureFromBundle = "UI/Soldier/64/" + charKindInfo.GetPortraitFile1(0, string.Empty) + "_64"; obSoldierInfo.m_itSol.SetTextureFromBundle(textureFromBundle); obSoldierInfo.m_nBUID = nkBattleChar.GetBUID(); obSoldierInfo.m_dtQuestion.Visible = false; obSoldierInfo.m_fMaxHP = (float)nkBattleChar.GetMaxHP(false); this.UpdateHP(nkBattleChar.Ally, nkBattleChar.GetBUID(), (float)nkBattleChar.GetSoldierInfo().GetHP(), 0, false); this.SetEnableTurn(nkBattleChar.Ally, nkBattleChar.GetBUID(), nkBattleChar.GetTurnState() != eBATTLE_TURN_STATE.eBATTLE_TURN_STATE_DISABLE); } } } } } } }
private void SetDirectionDummySoldier() { NrCharKindInfo charKindInfoFromCode = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfoFromCode("sol_ereina"); if (charKindInfoFromCode == null) { return; } string str = string.Empty; if (UIDataManager.IsUse256Texture()) { str = "_256"; } else { str = "_512"; } string imageKey = charKindInfoFromCode.GetPortraitFile1(6, string.Empty) + str; Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(imageKey); if (texture == null) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(imageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetSolFaceImage)); } else { this.SetImageAtTarget(texture, "face"); } string imageKey2 = "font_number" + (charKindInfoFromCode.GetSeason(1) + 1).ToString(); this.SetDummyImage(imageKey2, "fx_font_number"); this.SetDummyImage("card_legend", "back"); this.SetDummyImage("rankl7", "rank"); }
private void SetTextureBundleSub(int iCharKind, out string strFaceImageKey) { strFaceImageKey = string.Empty; NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(iCharKind); if (charKindInfo != null) { if (UIDataManager.IsUse256Texture()) { strFaceImageKey = charKindInfo.GetPortraitFile1(-1, string.Empty) + "_256"; } else { strFaceImageKey = charKindInfo.GetPortraitFile1(-1, string.Empty) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(strFaceImageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(strFaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } } }
public void SetSol() { for (int i = 0; i < 4; i++) { int coloseumSupportSoldier = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetColoseumSupportSoldier(i); NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(coloseumSupportSoldier); if (charKindInfo != null) { string textureFromBundle = string.Empty; textureFromBundle = "UI/Soldier/64/" + charKindInfo.GetPortraitFile1(0, string.Empty) + "_64"; this.m_itSol[i].SetTextureFromBundle(textureFromBundle); } } }
private string SetFaceImageKey(NkSoldierInfo kSol) { string text = string.Empty; if (kSol == null) { return(text); } NrCharKindInfo charKindInfo = kSol.GetCharKindInfo(); if (charKindInfo == null) { TsLog.LogError("SetImage SolID ={0} Not Found Kind", new object[] { kSol.GetCharKind() }); return(text); } int costumeUnique = (int)kSol.GetSolSubData(eSOL_SUBDATA.SOL_SUBDATA_COSTUME); string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(costumeUnique); string portraitFile = charKindInfo.GetPortraitFile1((int)kSol.GetGrade(), costumePortraitPath); if (UIDataManager.IsUse256Texture()) { text = portraitFile + "_256"; } else { text = portraitFile + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(text)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(text, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } return(text); }
public void GetComposeTranscendence(bool bCompose, int i32BaseKind, byte i8BaseRank, byte i8UpgradeRank, int i32SubKind, byte i8SubRank, int i32ItemNum, int i32CostumeUnique) { this.InitComposeData(); this.m_bComposeTranscendence = bCompose; this.m_i32FailItemNum = i32ItemNum; if (bCompose) { this.m_bSetrankText = false; } else { this.m_bSetrankText = true; } this.m_bSetrank = false; this.m_bSetface = false; this.m_bEffectUpdate = false; NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32BaseKind); if (charKindInfo == null) { return; } NrCharKindInfo charKindInfo2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32SubKind); if (charKindInfo2 == null) { return; } NrCharKindInfo charKindInfo3 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32BaseKind); if (charKindInfo3 == null) { return; } this.m_strBaserankImageKey = this.GetLegendType(charKindInfo, (int)i8BaseRank) + ((int)(i8BaseRank + 1)).ToString(); this.m_strUpgraderankImageKey = this.GetLegendType(charKindInfo3, (int)i8UpgradeRank) + ((int)(i8UpgradeRank + 1)).ToString(); this.m_strSubrankImageKey = this.GetLegendType(charKindInfo2, (int)i8SubRank) + ((int)(i8SubRank + 1)).ToString(); if (charKindInfo.GetLegendType((int)i8BaseRank) == 2) { this.m_bLegendBaseType = true; } else { this.m_bLegendBaseType = false; } if (charKindInfo2.GetLegendType((int)i8SubRank) == 2) { this.m_bLegendSubType = true; } else { this.m_bLegendSubType = false; } string str = string.Empty; if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strBaserankImageKey)) { str = string.Format("{0}", "UI/Soldier/" + this.m_strBaserankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strBaserankImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strUpgraderankImageKey)) { str = string.Format("{0}", "UI/Soldier/" + this.m_strUpgraderankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem2 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem2.SetItemType(ItemType.USER_ASSETB); wWWItem2.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strUpgraderankImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem2, DownGroup.RUNTIME, true); } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strSubrankImageKey)) { str = string.Format("{0}", "UI/Soldier/" + this.m_strSubrankImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem3 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem3.SetItemType(ItemType.USER_ASSETB); wWWItem3.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strSubrankImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem3, DownGroup.RUNTIME, true); } if (!this.m_bSetrankText) { this.m_strUpgraderankTextImageKey = this.GetRankText((int)i8UpgradeRank); if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strUpgraderankTextImageKey)) { str = string.Format("{0}", "UI/Soldier/" + this.m_strUpgraderankTextImageKey + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem4 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem4.SetItemType(ItemType.USER_ASSETB); wWWItem4.SetCallback(new PostProcPerItem(this.SetBundleImage), this.m_strUpgraderankTextImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem4, DownGroup.RUNTIME, true); } } string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(i32CostumeUnique); if (UIDataManager.IsUse256Texture()) { this.m_strBasefaceImageKey = charKindInfo.GetPortraitFile1((int)i8BaseRank, costumePortraitPath) + "_256"; } else { this.m_strBasefaceImageKey = charKindInfo.GetPortraitFile1((int)i8BaseRank, costumePortraitPath) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strBasefaceImageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.m_strBasefaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } if (UIDataManager.IsUse256Texture()) { this.m_strUpgradefaceImageKey = charKindInfo3.GetPortraitFile1((int)i8UpgradeRank, string.Empty) + "_256"; } else { this.m_strUpgradefaceImageKey = charKindInfo3.GetPortraitFile1((int)i8UpgradeRank, string.Empty) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strUpgradefaceImageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.m_strUpgradefaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } if (UIDataManager.IsUse256Texture()) { this.m_strSubfaceImageKey = charKindInfo2.GetPortraitFile1((int)i8SubRank, string.Empty) + "_256"; } else { this.m_strSubfaceImageKey = charKindInfo2.GetPortraitFile1((int)i8SubRank, string.Empty) + "_512"; } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strSubfaceImageKey)) { NrTSingleton <UIImageBundleManager> .Instance.RequestCharImage(this.m_strSubfaceImageKey, eCharImageType.LARGE, new PostProcPerItem(this.SetBundleImage)); } str = string.Format("{0}", "UI/Soldier/fx_legendcard_compose" + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem5 = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem5.SetItemType(ItemType.USER_ASSETB); wWWItem5.SetCallback(new PostProcPerItem(this.SolComposeSuccess), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem5, DownGroup.RUNTIME, true); this.eBUNDLEDOWN = SolTranscendenceSuccess.eBUNDLEDOWNSTATE.eBUNDLE_DOWNING; }
public void SetChallengeCount(int nCount, bool bBoss, int[] nMonsterKind) { Vector2 screenPos = new Vector2(GUICamera.width / 2f, GUICamera.height / 2f); if (EffectDefine.IsValidParent(this.m_EffectBattleChallenge)) { this.m_EffectBattleChallenge = NrTSingleton <NkEffectManager> .Instance.CreateEffectUI("FX_BATTLE_CHALLENGE", screenPos, new NkEffectUnit.DeleteCallBack(this.ChallengeEffectDeleteCallBack)); } else { this.m_EffectBattleChallenge.SetActive(false); this.m_EffectBattleChallenge.layer = TsLayer.GUI; } Transform child = NkUtil.GetChild(this.m_EffectBattleChallenge.transform, "fx_text"); Transform child2 = NkUtil.GetChild(this.m_EffectBattleChallenge.transform, "fx_final"); Transform child3 = NkUtil.GetChild(this.m_EffectBattleChallenge.transform, "fx_challenge"); Transform child4 = NkUtil.GetChild(this.m_EffectBattleChallenge.transform, "fx_bonus"); GameObject gameObject = null; GameObject gameObject2 = null; GameObject gameObject3 = null; if (child2 != null) { gameObject = child2.gameObject; } if (child4 != null) { gameObject3 = child4.gameObject; } if (child != null) { GameObject gameObject4 = child.gameObject; if (gameObject4 != null) { MeshFilter component = gameObject4.GetComponent <MeshFilter>(); Vector2[] array = new Vector2[component.mesh.uv.Length]; if (component != null) { if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID) { Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_strText); if (component != null) { array[0].x = 0f; array[0].y = 1f; array[1].x = 1f; array[1].y = 1f; array[2].x = 0f; array[2].y = 0f; array[3].x = 1f; array[3].y = 0f; component.mesh.uv = array; } Material material = new Material(Shader.Find("Transparent/Vertex Colored" + NrTSingleton <UIDataManager> .Instance.AddFilePath)); if (null != gameObject4.renderer && null != material) { gameObject4.renderer.sharedMaterial = material; } if (null != texture) { material.mainTexture = texture; } else { CustomMonsterProtriteInfo customMonsterProtriteInfo = new CustomMonsterProtriteInfo(); customMonsterProtriteInfo.m_goAniObject = gameObject4; customMonsterProtriteInfo.m_Material = gameObject4.renderer.sharedMaterial; customMonsterProtriteInfo.m_szImageKey = this.m_strText; string str = string.Format("{0}", "UI/mythicraid/" + this.m_strText + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.SetBundleImage), customMonsterProtriteInfo); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); } } else if (nCount > 1) { for (int i = 0; i < array.Length; i++) { array[i] = component.mesh.uv[i]; Vector2[] expr_360_cp_0 = array; int expr_360_cp_1 = i; expr_360_cp_0[expr_360_cp_1].y = expr_360_cp_0[expr_360_cp_1].y - this.m_fBattleContinueEffectUV; } if (component != null) { component.mesh.uv = array; } } } } if (bBoss) { if (nCount < 100) { if (gameObject != null) { if (child3.gameObject != null) { child3.gameObject.SetActive(false); } if (gameObject3 != null) { gameObject3.SetActive(false); } gameObject.SetActive(true); Animation component2 = gameObject.GetComponent <Animation>(); if (component2 != null) { Battle.BATTLE.m_fContinueBattleWaitTime = Time.realtimeSinceStartup + component2.clip.length + 0.1f; } else { Battle.BATTLE.m_fContinueBattleWaitTime = Time.realtimeSinceStartup + 2f; } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "BATTLE-CONTINUE-BOSS"); if (Battle.BATTLE != null) { Battle.BATTLE.PlayBossBGM(); } } } else if (nCount >= 100 && gameObject3 != null) { if (child3.gameObject != null) { child3.gameObject.SetActive(false); } if (gameObject != null) { gameObject.SetActive(false); } gameObject3.SetActive(true); Animation component3 = gameObject3.GetComponent <Animation>(); if (component3 != null) { Battle.BATTLE.m_fContinueBattleWaitTime = Time.realtimeSinceStartup + component3.clip.length + 0.1f; } else { Battle.BATTLE.m_fContinueBattleWaitTime = Time.realtimeSinceStartup + 2f; } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "HIDDEN_BONUS"); if (Battle.BATTLE != null) { Battle.BATTLE.PlayBossBGM(); } } } else { child3.gameObject.SetActive(false); gameObject2 = child3.gameObject; if (gameObject != null) { gameObject.SetActive(false); } if (gameObject3 != null) { gameObject3.SetActive(false); } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "BATTLE-CONTINUE"); } } if (!bBoss) { for (int j = 0; j < 6; j++) { NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(nMonsterKind[j]); string strName = string.Empty; string text = string.Empty; eCharImageType type; if (j == 0) { strName = string.Format("fx_boss", new object[0]); if (charKindInfo != null) { if (UIDataManager.IsUse256Texture()) { text = charKindInfo.GetPortraitFile1(-1, string.Empty) + "_256"; } else { text = charKindInfo.GetPortraitFile1(-1, string.Empty) + "_512"; } } type = eCharImageType.LARGE; } else { strName = string.Format("fx_enemy0{0}", j.ToString()); if (charKindInfo != null) { text = charKindInfo.GetPortraitFile1(-1, string.Empty) + "_64"; } type = eCharImageType.SMALL; } Transform child5 = NkUtil.GetChild(this.m_EffectBattleChallenge.transform, strName); if (child5 != null) { GameObject gameObject5 = child5.gameObject; if (null != gameObject5) { if (charKindInfo == null) { gameObject5.SetActive(false); } else { gameObject5.SetActive(true); Renderer component4 = gameObject5.GetComponent <Renderer>(); if (component4 != null) { Material material2 = component4.material; if (null != material2) { if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(text)) { CustomMonsterProtriteInfo customMonsterProtriteInfo2 = new CustomMonsterProtriteInfo(); customMonsterProtriteInfo2.m_goAniObject = gameObject2; customMonsterProtriteInfo2.m_Material = material2; customMonsterProtriteInfo2.m_szImageKey = text; NrTSingleton <UIImageBundleManager> .Instance.RequestCharImageCustomParam(text, type, new PostProcPerItem(this.SetBundleImage), customMonsterProtriteInfo2); } else { material2.mainTexture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(text); gameObject2.SetActive(true); } } } } } } } } Vector2 screenPos2 = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); this.m_EffectBattleChallenge.transform.position = base.GetEffectUIPos(screenPos2); this.m_EffectBattleChallenge.SetActive(true); this.m_nCurrentContinueCount = nCount; }
public void SetSolList() { this.m_kSolList.Clear(); for (int i = 0; i < 4; i++) { COLOSSEUM_SUPPORTSOLDIER colosseumSupportSoldierdata = NrTSingleton <NkCharManager> .Instance.m_kMyCharInfo.GetColosseumSupportSoldierdata(i); if (colosseumSupportSoldierdata != null) { int i32CharKind = colosseumSupportSoldierdata.i32CharKind; NrCharKindInfo charKindInfo = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(i32CharKind); if (charKindInfo != null) { NkSoldierInfo nkSoldierInfo = new NkSoldierInfo(); nkSoldierInfo.SetCharKind(i32CharKind); nkSoldierInfo.SetLevel(1); this.m_kSolList.Add(nkSoldierInfo); this.m_SoldierContoller[i].m_btSelect.data = nkSoldierInfo; this.m_SoldierContoller[i].m_lbName.SetText(nkSoldierInfo.GetName()); string textureFromBundle = string.Empty; if (UIDataManager.IsUse256Texture()) { textureFromBundle = "UI/Soldier/256/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_256"; } else { textureFromBundle = "UI/Soldier/512/" + charKindInfo.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_512"; } this.m_SoldierContoller[i].m_dwSolFace.SetTextureFromBundle(textureFromBundle); if (charKindInfo.GetWeaponType() > 0) { this.m_SoldierContoller[i].m_dwWeaphonIcon.SetTexture(string.Format("Win_I_Weapon{0}", charKindInfo.GetWeaponType().ToString())); } int battleSkillUnique = charKindInfo.GetBattleSkillUnique(0); BATTLESKILL_BASE battleSkillBase = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillBase(battleSkillUnique); BATTLESKILL_DETAIL battleSkillDetail = NrTSingleton <BattleSkill_Manager> .Instance.GetBattleSkillDetail(battleSkillUnique, 1); if (battleSkillBase == null || battleSkillDetail == null) { return; } if (battleSkillBase.m_nColosseumSkillDesc > 0) { string textFromInterface = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_nColosseumSkillDesc.ToString()); if (textFromInterface != string.Empty) { string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { textFromInterface, "skillname", NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(battleSkillBase.m_strTextKey), "count", battleSkillDetail.m_nSkillNeedAngerlyPoint }); this.m_SoldierContoller[i].m_lbSkillDesc.SetText(empty); } } bool bShowLabel = true; int num = 0; for (int j = 0; j < 6; j++) { if (colosseumSupportSoldierdata.i32RivalCharKind[j] > 0) { NrCharKindInfo charKindInfo2 = NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(colosseumSupportSoldierdata.i32RivalCharKind[j]); if (charKindInfo2 != null) { string textureFromBundle2 = "UI/Soldier/64/" + charKindInfo2.GetPortraitFile1((int)nkSoldierInfo.GetGrade(), string.Empty) + "_64"; this.m_SoldierContoller[i].m_dtRelationFace[num].SetTextureFromBundle(textureFromBundle2); num++; bShowLabel = false; } } } this.m_SoldierContoller[i].m_bShowLabel = bShowLabel; } } } }