private void EquipItem(WWWItem _item, object _param) { Main_UI_SystemMessage.CloseUI(); if (this == null) { return; } if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_RootObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject); this.m_RootObject.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag; if (this == null) { UnityEngine.Object.Destroy(this.m_RootObject); return; } this.m_AniObject = NkUtil.GetChild(this.m_RootObject.transform, "fx_direct_weapon").gameObject; Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 100f; this.m_RootObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.m_RootObject, GUICamera.UILayer); this.m_fStartTime = Time.realtimeSinceStartup; if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_RootObject); } } } }
public WWWProgress RequestDownloadCoroutine(WWWItem wItem, DownGroup dnGroup, bool unloadAfterPostProcess) { if (wItem != null) { List <WWWItem> list = new List <WWWItem>(); if (Option.EnableReportCallStatck) { wItem.RequestCallStack = StackTraceUtility.ExtractStackTrace(); } list.Add(wItem); if (Option.EnableTrace) { wItem.DebugUnloadReserved = unloadAfterPostProcess; TsLog.Log("[TsBundle] RequestDownloadCoroutine( Unload={0} ) => \"{1}\"", new object[] { unloadAfterPostProcess, wItem.assetPath }); } WWWProgress wWWProgress = new WWWProgress(list); this._AddRequestList(list, dnGroup, wWWProgress); base.StartCoroutine(this._DownloadPerList(list, unloadAfterPostProcess, null, null)); return(wWWProgress); } return(null); }
public Texture2D RequestDownloads(string strAssetPath, PostProcPerItem callbackDelegate, object objs) { Texture2D texture2D = null; WWWItem wWWItem = Holder.TryGetOrCreateBundle(strAssetPath + Option.extAsset, null); if (wWWItem != null && (wWWItem.isCanceled || !wWWItem.canAccessAssetBundle)) { wWWItem.SetItemType(ItemType.TEXTURE2D); wWWItem.SetCallback(callbackDelegate, objs); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); } if (wWWItem.mainAsset == null) { TsLog.LogWarning("wItem.mainAsset is null -> Path = {0}", new object[] { wWWItem.assetPath }); } else { texture2D = (wWWItem.mainAsset as Texture2D); DrawTexture[] array = objs as DrawTexture[]; DrawTexture[] array2 = array; for (int i = 0; i < array2.Length; i++) { DrawTexture drawTexture = array2[i]; if (drawTexture != null) { drawTexture.SetTexture(texture2D); } } } return(texture2D); }
private void Effect_Wakeup_Change(WWWItem _item, object _param) { if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_gbWakeup_Change_1 = (UnityEngine.Object.Instantiate(gameObject) as GameObject); this.m_gbWakeup_Change_2 = (UnityEngine.Object.Instantiate(gameObject) as GameObject); this.m_gbWakeup_Change_3 = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (this == null) { UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Change_1); UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Change_2); UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Change_3); return; } NkUtil.SetAllChildLayer(this.m_gbWakeup_Change_1, GUICamera.UILayer); NkUtil.SetAllChildLayer(this.m_gbWakeup_Change_2, GUICamera.UILayer); NkUtil.SetAllChildLayer(this.m_gbWakeup_Change_3, GUICamera.UILayer); this.m_gbWakeup_Change_1.SetActive(false); this.m_gbWakeup_Change_2.SetActive(false); this.m_gbWakeup_Change_3.SetActive(false); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Change_1); NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Change_2); NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Change_3); } } } }
private void ShowCredit(WWWItem _item, object _param) { Main_UI_SystemMessage.CloseUI(); if (this == null) { return; } if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (this == null) { UnityEngine.Object.DestroyImmediate(this.rootGameObject); return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 90f; this.rootGameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer); this.childGameObject = NkUtil.GetChild(this.rootGameObject.transform, "fx_ending").gameObject; if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject); } } } }
private void SetImage(WWWItem _item, object _param) { if (this == null) { return; } if (_item.isCanceled) { return; } if (_item.GetSafeBundle() != null) { Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D; if (null != texture2D) { this.m_DtSoldierImg.SetTexture(texture2D); string imageKey = string.Empty; if (_param is string) { imageKey = (string)_param; NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D); return; } } } }
public static void CharPortraitBundleCallback(WWWItem item, object param) { if (item.isCanceled) { return; } if (item.GetSafeBundle() == null) { return; } Texture2D texture2D = item.GetSafeBundle().mainAsset as Texture2D; if (texture2D == null) { return; } object[] array = param as object[]; if (array == null || array.Length != 2) { Debug.Log("NORMAL, NkUtil.cs, CharPortraitBundleCallback(). parameters is strange"); return; } NkUtil.RequestCharPortraitCallback requestCharPortraitCallback = array[0] as NkUtil.RequestCharPortraitCallback; if (requestCharPortraitCallback != null) { requestCharPortraitCallback(texture2D); } string text = array[1] as string; if (!string.IsNullOrEmpty(text)) { NrTSingleton <UIImageBundleManager> .Instance.AddTexture(text, texture2D); } }
private Texture2D SaveBundleImage(WWWItem item, object param) { if (item.GetSafeBundle() == null || item.GetSafeBundle().mainAsset == null) { return(null); } if (item.GetSafeBundle().mainAsset == null) { return(null); } Texture2D texture2D = item.GetSafeBundle().mainAsset as Texture2D; if (texture2D == null) { return(null); } if (!(param is string)) { return(null); } string imageKey = (string)param; if (NrTSingleton <UIImageBundleManager> .Instance.GetTexture(imageKey) == null) { NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D); } return(texture2D); }
public override void SetComponent() { this.m_BG = (base.GetControl("Main_BG") as DrawTexture); this.m_BG.SetTextureFromBundle("UI/Exploration/MainBG"); this.m_Continue = (base.GetControl("Continue_Btn") as Button); this.m_Continue.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickContinue)); this.m_Continue.EffectAni = false; this.m_Close = (base.GetControl("End_Btn") as Button); this.m_Close.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickClose)); this.m_Skip = (base.GetControl("Skip_Btn") as Button); this.m_Skip.SetSize(GUICamera.width, GUICamera.height); this.m_Skip.AddValueChangedDelegate(new EZValueChangedDelegate(this.ClickSkip)); this.m_Skip.Visible = false; this.m_BG = (base.GetControl("DrawTexture_will1") as DrawTexture); this.m_lb_WillNum = (base.GetControl("Label_WillNum") as Label); this.m_lbActivityTime = (base.GetControl("Will_Time_Label") as Label); this.m_ResultText = (base.GetControl("Result_Label") as Label); this.m_ResultText.Visible = false; base.ShowLayer(1); base.SetScreenCenter(); string str = string.Format("{0}", "UI/Exploration/fx_direct_exploere" + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.ExplorationPlay1), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); string str2 = string.Format("{0}", "UI/Exploration/fx_direct_treasurebox" + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem2 = Holder.TryGetOrCreateBundle(str2 + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem2.SetItemType(ItemType.USER_ASSETB); wWWItem2.SetCallback(new PostProcPerItem(this.ExplorationPlay2), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem2, DownGroup.RUNTIME, true); UIDataManager.MuteSound(true); }
private void SetImage(WWWItem _item, object _param) { if (null == this) { return; } if (_item.isCanceled) { this.reserve = true; return; } if (_item.GetSafeBundle() != null) { Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D; if (null != texture2D) { base.SetTexture(texture2D); string text = string.Empty; if (_param is string) { text = (string)_param; NrTSingleton <UIImageBundleManager> .Instance.AddTexture(text, texture2D); return; } } } this.reserve = true; }
private void SolComposeSuccess(WWWItem _item, object _param) { Main_UI_SystemMessage.CloseUI(); if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (null == this.rootGameObject) { return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.rootGameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer); this.aniGameObject = this.rootGameObject.GetComponentInChildren <Animation>(); if (null == this.aniGameObject) { return; } this.bUpdate = true; this.startTime = Time.realtimeSinceStartup; if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject); } this.Show(); } } }
private void NewRecordEffectPlay(WWWItem _item, object _param) { if (_item.GetSafeBundle() == null || _item.GetSafeBundle().mainAsset == null) { Debug.LogError("ERROR, Battle_MythRaidBattleInfo_DLG.cs, NewRecordEffectPlay(), _item.GetSafeBundle() is Null "); return; } GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (gameObject == null) { return; } GameObject gameObject2 = UnityEngine.Object.Instantiate(gameObject) as GameObject; Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 500f; gameObject2.transform.position = effectUIPos; NkUtil.SetAllChildLayer(gameObject2, GUICamera.UILayer); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref gameObject2); } }
private void Effect_Fade(WWWItem _item, object _param) { if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_gbEffect_Fade = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (this == null) { UnityEngine.Object.DestroyImmediate(this.m_gbEffect_Fade); return; } Vector2 size = this.m_DrawTexture_Main_BG.GetSize(); this.m_gbEffect_Fade.transform.parent = this.m_DrawTexture_Main_BG.gameObject.transform; this.m_gbEffect_Fade.transform.localPosition = new Vector3(size.x / 2f, -size.y / 2f, this.m_DrawTexture_Main_BG.gameObject.transform.localPosition.z - 0.1f); NkUtil.SetAllChildLayer(this.m_gbEffect_Fade, GUICamera.UILayer); this.m_gbEffect_Fade.SetActive(false); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbEffect_Fade); } } } }
public void LoadEffect() { this.m_strText = string.Format("{0}{1}", "UI/Soldier/fx_wakeup_glow", NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(this.m_strText + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.Effect_Wakeup_Glow), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); this.m_strText = string.Format("{0}{1}", "UI/Soldier/fx_wakeup_start", NrTSingleton <UIDataManager> .Instance.AddFilePath); wWWItem = Holder.TryGetOrCreateBundle(this.m_strText + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.Effect_Wakeup_Start), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); this.m_strText = string.Format("{0}{1}", "UI/Soldier/fx_wakeup_apply", NrTSingleton <UIDataManager> .Instance.AddFilePath); wWWItem = Holder.TryGetOrCreateBundle(this.m_strText + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.Effect_Wakeup_Apply), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); this.m_strText = string.Format("{0}{1}", "UI/Soldier/fx_wakeup_text", NrTSingleton <UIDataManager> .Instance.AddFilePath); wWWItem = Holder.TryGetOrCreateBundle(this.m_strText + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.Effect_Wakeup_Text), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); this.m_strText = string.Format("{0}{1}", "UI/Soldier/fx_wakeup_change", NrTSingleton <UIDataManager> .Instance.AddFilePath); wWWItem = Holder.TryGetOrCreateBundle(this.m_strText + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.Effect_Wakeup_Change), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); }
private void SetBundleImage(WWWItem _item, object _param) { if (_item.GetSafeBundle() == null) { return; } if (_item.GetSafeBundle().mainAsset == null) { return; } Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D; if (texture2D == null) { return; } string imageKey = string.Empty; if (_param is string) { imageKey = (string)_param; NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D); for (int i = 0; i < this.solSettingList.Count; i++) { this.solSettingList[i].TextureLoaded(imageKey); } } }
public override void SetComponent() { for (int i = 0; i < 9; i++) { this.m_btOccMilitary[i] = (base.GetControl(string.Format("BT_User0{0}", i + 1)) as Button); this.m_itOccMilitary[i] = (base.GetControl(string.Format("DT_User0{0}", i + 1)) as ItemTexture); } this.m_lTitle = (base.GetControl("LB_Title") as Label); this.m_dBGImage = (base.GetControl("DT_ImageBG") as DrawTexture); this.m_btClose = (base.GetControl("BT_Cancel") as Button); Button expr_A5 = this.m_btClose; expr_A5.Click = (EZValueChangedDelegate)Delegate.Combine(expr_A5.Click, new EZValueChangedDelegate(this.OnBtnClickClose)); this.m_btGoMilitarySet = (base.GetControl("BT_Start") as Button); Button expr_E2 = this.m_btGoMilitarySet; expr_E2.Click = (EZValueChangedDelegate)Delegate.Combine(expr_E2.Click, new EZValueChangedDelegate(this.OnBtnClickGoMilitarySet)); this.Show(); string str = string.Format("UI/Mine/{0}{1}", "bg_minemilitaryset", NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.SetBackImage), "bg_minemilitaryset"); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); }
private void SetActionReforge(WWWItem _item, object _param) { Main_UI_SystemMessage.CloseUI(); if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject); Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.rootGameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer); base.InteractivePanel.MakeChild(this.rootGameObject); this.aniGameObject = this.rootGameObject.GetComponentInChildren <Animation>(); this.bLoadActionReforge = true; if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject); } TsAudio.StoreMuteAllAudio(); TsAudio.SetExceptMuteAllAudio(EAudioType.UI, true); TsAudio.RefreshAllMuteAudio(); NkInputManager.IsInputMode = false; } } }
public static Texture2D RequestDownload(string strAssetPath, PostProcPerItem callbackDelegate, object obj) { Texture2D texture2D = null; WWWItem wWWItem = Holder.TryGetOrCreateBundle(strAssetPath + Option.extAsset, null); if (wWWItem != null && (wWWItem.isCanceled || !wWWItem.canAccessAssetBundle)) { wWWItem.SetItemType(ItemType.TEXTURE2D); wWWItem.SetCallback(callbackDelegate, obj); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); } if (!(wWWItem.mainAsset == null)) { texture2D = (wWWItem.mainAsset as Texture2D); DrawTexture drawTexture = obj as DrawTexture; if (drawTexture != null) { CharChangeMainDlg.SetTexture(drawTexture, texture2D); } else { GameObject gameObject = obj as GameObject; if (gameObject != null) { CharChangeMainDlg.SetCharFaceTexture(gameObject, texture2D); } } } return(texture2D); }
private void SetBackImage(WWWItem _item, object _param) { if (null == _item.GetSafeBundle()) { return; } if (null == _item.GetSafeBundle().mainAsset) { return; } GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject); this.m_rootGameObject.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag; Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.m_rootGameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.m_rootGameObject, GUICamera.UILayer); this.m_goldenEgg = NkUtil.GetChild(this.m_rootGameObject.transform, "fx_goldegg").gameObject; this.m_whiiteEgg = NkUtil.GetChild(this.m_rootGameObject.transform, "fx_whiteegg").gameObject; if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_rootGameObject); } } }
private void SetBundleImage(WWWItem _item, object _param) { if (_item.GetSafeBundle() != null) { if (null != _item.GetSafeBundle().mainAsset) { Texture2D texture2D = _item.GetSafeBundle().mainAsset as Texture2D; if (null != texture2D) { string imageKey = string.Empty; if (_param is string) { imageKey = (string)_param; NrTSingleton <UIImageBundleManager> .Instance.AddTexture(imageKey, texture2D); } } } } else if (this.m_goSummonEffect != null) { UnityEngine.Object.Destroy(this.m_goSummonEffect); this.m_goSummonEffect = null; this.m_fSummonEndTime = 0f; } }
private void SetTextureBundle() { if (NrTSingleton <NrCharKindInfoManager> .Instance.GetCharKindInfo(this.m_pkSolinfo.GetCharKind()) == null) { return; } this.SetGui(); string costumePortraitPath = NrTSingleton <NrCharCostumeTableManager> .Instance.GetCostumePortraitPath(this.m_pkSolinfo); string text = MsgHandler.HandleReturn <string>("PortraitFileName", new object[] { this.m_pkSolinfo.GetCharKind(), (int)(this.m_bBaseGrade - 1) }); if (string.Empty == text) { return; } if (!string.IsNullOrEmpty(costumePortraitPath)) { string text2 = MsgHandler.HandleReturn <string>("PortraitCostumeFileName", new object[] { this.m_pkSolinfo.GetCharKind(), (int)(this.m_bBaseGrade - 1), costumePortraitPath }); if (!string.IsNullOrEmpty(text2)) { text = text2; } } if (UIDataManager.IsUse256Texture()) { this.FaceImageKey = text + "_256"; } else { this.FaceImageKey = text + "_512"; } this.BaseRankImageKey = "rankl" + this.m_bBaseGrade.ToString(); this.ChangeRankImageKey = "rankm" + this.m_bChangeGrade.ToString(); if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.BaseRankImageKey)) { string str = string.Format("{0}", "UI/Soldier/" + this.BaseRankImageKey + 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.BaseRankImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); } if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.ChangeRankImageKey)) { string str2 = string.Format("{0}", "UI/Soldier/" + this.ChangeRankImageKey + 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.ChangeRankImageKey); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem2, DownGroup.RUNTIME, true); } this.eBUNDLEDOWN = Myth_Evolution_Success_DLG.eBUNDLEDOWNSTATE.eBUNDLE_DOWNING; }
public override void SetComponent() { this.m_lbCount = (base.GetControl("Label_count") as Label); this.m_dwBG = (base.GetControl("bg") as DrawTexture); if (this.m_dwBG != null) { NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_UI_COUNTDOWN", this.m_dwBG, this.m_dwBG.GetSize()); this.m_dwBG.AddGameObjectDelegate(new EZGameObjectDelegate(this.effectdownload)); } this.m_dtPreviewBG = (base.GetControl("DT_PreviewBG") as DrawTexture); this.m_lbPreview = (base.GetControl("Label_Preview") as Label); this.m_dtPreviewBG.Visible = false; this.m_lbPreview.Visible = false; this.m_strText = "mythic_raid_nextround"; if (null == NrTSingleton <UIImageBundleManager> .Instance.GetTexture(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.SetBundleTextureImage), this.m_strText); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); } this.SetVisibleFlag(false); if (Battle.BATTLE != null && Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_PREVIEW) { this.SetControl_PreviewHero(); } }
private void Effect_Wakeup_Text(WWWItem _item, object _param) { if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_gbWakeup_Text = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (this == null) { UnityEngine.Object.DestroyImmediate(this.m_gbWakeup_Text); return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); this.m_gbWakeup_Text.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.m_gbWakeup_Text, GUICamera.UILayer); this.m_gbWakeup_Text.SetActive(false); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbWakeup_Text); } } } }
private void Effect_Set(WWWItem _item, object _param) { AutoSpriteControlBase autoSpriteControlBase = _param as AutoSpriteControlBase; if (null != _item.GetSafeBundle() && autoSpriteControlBase != null && autoSpriteControlBase.gameObject != null && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_gbEffect_Set = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (this == null) { UnityEngine.Object.DestroyImmediate(this.m_gbEffect_Set); return; } Vector2 size = autoSpriteControlBase.GetSize(); this.m_gbEffect_Set.transform.parent = autoSpriteControlBase.gameObject.transform; this.m_gbEffect_Set.transform.localPosition = new Vector3(size.x / 2f, -size.y / 2f, autoSpriteControlBase.gameObject.transform.localPosition.z + 1.05f); NkUtil.SetAllChildLayer(this.m_gbEffect_Set, GUICamera.UILayer); this.m_gbEffect_Set.SetActive(true); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbEffect_Set); } } } }
private void LoadMaterial() { if (this.m_MaterialNames == null) { return; } this.m_ProgressCount = this.m_MaterialNames.Length; this.m_Materials = new Material[this.m_ProgressCount]; for (int i = 0; i < this.m_MaterialNames.Length; i++) { if (!string.IsNullOrEmpty(this.m_MaterialNames[i])) { string text = TsMaterialBundleLoader.MakeBundlePath(this.m_MaterialNames[i]); WWWItem wWWItem = Holder.TryGetOrCreateBundle(text, TsMaterialBundleLoader.CommonTextureGroup.Name); if (wWWItem != null) { wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this.OnCompleteDownload), i); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, false); } else { TsLog.LogError("[RuntimeTexture] cannot create WWWItem (\"{0}\")", new object[] { text }); } } } }
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 BaseBundle(string _BundlePath) { string key = BaseBundle.AssetRoot + _BundlePath + BaseBundle.AssetExt; this.wItem = Holder.TryGetOrCreateBundle(key, null); this.wItem.SetItemType(ItemType.USER_ASSETB); TsImmortal.bundleService.RequestDownloadCoroutine(this.wItem, DownGroup.RUNTIME, false); }
private void EffectShow() { string str = "Effect/Instant/fx_levelup_ui" + NrTSingleton <UIDataManager> .Instance.AddFilePath; WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(new PostProcPerItem(this._funcUIEffectDownloaded), null); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); }
public void RequestBundleImage(string bundlepath, PostProcPerItem callbackDelegate, object callBackParam, bool unloadAfterPostProcess = true) { string str = string.Format("{0}{1}", bundlepath, NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, MsgHandler.HandleReturn <string>("UIBundleStackName", new object[0])); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(callbackDelegate, callBackParam); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, unloadAfterPostProcess); }
private void EffectLoad(string effect, PostProcPerItem callback, object callbackParam) { string str = string.Format("{0}", "UI/Soldier/" + effect + NrTSingleton <UIDataManager> .Instance.AddFilePath); WWWItem wWWItem = Holder.TryGetOrCreateBundle(str + Option.extAsset, NkBundleCallBack.UIBundleStackName); wWWItem.SetItemType(ItemType.USER_ASSETB); wWWItem.SetCallback(callback, callbackParam); TsImmortal.bundleService.RequestDownloadCoroutine(wWWItem, DownGroup.RUNTIME, true); }