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 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 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 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 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); } } } }
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; } } }
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); } } } }
private void SetCostumeCharLayer() { GameObject costumeChar = this._costumeCharSetter._CostumeChar; if (costumeChar == null) { return; } GameObject gameObject = GameObject.Find("UI Camera"); if (gameObject == null) { return; } Camera componentInChildren = gameObject.GetComponentInChildren <Camera>(); if (componentInChildren == null) { return; } Collider[] componentsInChildren = costumeChar.GetComponentsInChildren <Collider>(); Collider[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { Collider collider = array[i]; collider.enabled = false; } NkUtil.SetAllChildLayer(costumeChar, GUICamera.UILayer); }
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); } } } }
public void _OnEffectProcess(IDownloadedItem wItem, object obj) { if (wItem != null && wItem.canAccessAssetBundle) { GameObject gameObject = wItem.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_gbEffect = (UnityEngine.Object.Instantiate(gameObject) as GameObject); Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); this.m_gbEffect.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.m_gbEffect, GUICamera.UILayer); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_gbEffect); } this.m_fCloseTime = Time.time + 5f; Transform child = NkUtil.GetChild(this.m_gbEffect.transform, "fx_character"); if (null != child) { this.SetCharFace(child, this.m_iChangeCharKind); } } } if (wItem.mainAsset == null) { TsLog.LogWarning("wItem.mainAsset is null -> Path = {0}", new object[] { wItem.assetPath }); } }
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); } } }
public void SetCriticalEffect() { if (this.m_goCriticalEffect != null) { UnityEngine.Object.Destroy(this.m_goCriticalEffect); this.m_goCriticalEffect = null; this.m_fCriticalEndTime = 0f; } if (Battle.BATTLE.ColosseumKill == null) { return; } this.m_goCriticalEffect = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.ColosseumCritical, Vector3.zero, Quaternion.identity); NkUtil.SetAllChildLayer(this.m_goCriticalEffect, GUICamera.UILayer); Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); this.m_goCriticalEffect.transform.position = effectUIPos; this.m_goCriticalEffect.SetActive(true); Animation componentInChildren = this.m_goCriticalEffect.GetComponentInChildren <Animation>(); if (componentInChildren != null) { this.m_fCriticalEndTime = Time.realtimeSinceStartup + componentInChildren.clip.length; } else { this.m_fCriticalEndTime = Time.realtimeSinceStartup + 0.7f; } if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_goCriticalEffect); } TsAudioManager.Instance.AudioContainer.RequestAudioClip("UI_SFX", "COLOSSEUM", "BATTLEHIT", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); }
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 _funcUIEffectDownloaded(IDownloadedItem wItem, object obj) { Main_UI_SystemMessage.CloseUI(); if (null == wItem.mainAsset) { TsLog.LogWarning("wItem.mainAsset is null -> Path = {0}", new object[] { wItem.assetPath }); return; } GameObject gameObject = wItem.mainAsset as GameObject; if (null == gameObject) { return; } if (null != this.m_SlotEffect) { UnityEngine.Object.Destroy(this.m_SlotEffect); } this.m_SlotEffect = (GameObject)UnityEngine.Object.Instantiate(gameObject, Vector3.zero, Quaternion.identity); if (null == this.m_SlotEffect) { return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.m_SlotEffect.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.m_SlotEffect, GUICamera.UILayer); if (this.m_bSuccess) { GameObject gameObject2 = NkUtil.GetChild(this.m_SlotEffect.transform, "fx_sucess").gameObject; if (null != gameObject2) { gameObject2.SetActive(true); } effectUIPos.x += 2.8f; effectUIPos.y += 26f; this.m_SlotEffect.transform.position = effectUIPos; TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "SUCCESS", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } else { GameObject gameObject3 = NkUtil.GetChild(this.m_SlotEffect.transform, "fx_fail").gameObject; if (null != gameObject3) { gameObject3.SetActive(true); } TsAudioManager.Container.RequestAudioClip("UI_SFX", "EQUIPMENT-UP", "FAIL", new PostProcPerItem(NrAudioClipDownloaded.OnEventAudioClipDownloadedImmedatePlay)); } if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_SlotEffect); } this.m_fStartTime = Time.realtimeSinceStartup; }
private void ShowResultFx() { if (Battle.BATTLE.ResultEffect != null) { this.m_goResultFX = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.ResultEffect, Vector3.zero, Quaternion.identity); this.m_goResultFX.SetActive(true); NkUtil.SetAllChildLayer(this.m_goResultFX, GUICamera.UILayer); Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); this.m_goResultFX.transform.position = base.GetEffectUIPos(screenPos); this.m_goResultFX.SetActive(true); Transform child = NkUtil.GetChild(this.m_goResultFX.transform, "result"); if (child != null) { Animation component = child.GetComponent <Animation>(); if (component != null) { if (component.isPlaying) { component.Stop(); } AnimationClip clip; if (this.m_ChildDlg.m_bWin) { clip = component.GetClip("victory"); component.Play("victory"); NrSound.ImmedatePlay("UI_SFX", "BATTLE", "WIN", true); } else { clip = component.GetClip("defeat"); component.Play("defeat"); NrSound.ImmedatePlay("UI_SFX", "BATTLE", "LOSE", true); } if (clip != null) { this.m_fResultFxTime = Time.realtimeSinceStartup + clip.length; } else { this.m_fResultFxTime = Time.realtimeSinceStartup - 1.5f; } } } this.m_OpenTime = 0f; } else { this.m_dtWinLose.Visible = true; this.m_OpenTime = Time.realtimeSinceStartup; this.m_fResultFxTime = 0f; UnityEngine.Object.Destroy(this.m_goResultFX); if (!this.m_bClearMiddleStage) { NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage(); this.m_bClearMiddleStage = true; } } }
private void _funcUIEffectDownloaded(IDownloadedItem wItem, object obj) { Main_UI_SystemMessage.CloseUI(); if (null == wItem.mainAsset) { TsLog.LogWarning("wItem.mainAsset is null -> Path = {0}", new object[] { wItem.assetPath }); return; } GameObject gameObject = wItem.mainAsset as GameObject; if (null == gameObject) { return; } this.SlotEffect = (GameObject)UnityEngine.Object.Instantiate(gameObject, Vector3.zero, Quaternion.identity); if (null == this.SlotEffect) { return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.SlotEffect.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.SlotEffect, GUICamera.UILayer); if (this.m_bItemUpgradeSuccess) { GameObject gameObject2 = NkUtil.GetChild(this.SlotEffect.transform, "fx_sucess").gameObject; if (null != gameObject2) { gameObject2.SetActive(true); } effectUIPos.x += 2.8f; effectUIPos.y += 26f; this.SlotEffect.transform.position = effectUIPos; } else { GameObject gameObject3 = NkUtil.GetChild(this.SlotEffect.transform, "fx_fail").gameObject; if (null != gameObject3) { gameObject3.SetActive(true); } } if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.SlotEffect); } if (null != this.SlotEffect) { UnityEngine.Object.DestroyObject(this.SlotEffect, 5f); } }
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)); }
private void SolRecruitSuccess(WWWItem _item, object _param) { Main_UI_SystemMessage.CloseUI(); if (this == null) { return; } if (null == _item.GetSafeBundle()) { return; } if (null == _item.GetSafeBundle().mainAsset) { return; } GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null == gameObject) { return; } this.rootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject); this.rootGameObject.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag; 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 = 300f; this.rootGameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.rootGameObject, GUICamera.UILayer); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootGameObject); } Animation[] componentsInChildren = this.rootGameObject.GetComponentsInChildren <Animation>(); Animation[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { Animation animation = array[i]; if (animation != null && animation.cullingType != AnimationCullingType.AlwaysAnimate) { animation.cullingType = AnimationCullingType.AlwaysAnimate; } } this.baseAnimation = componentsInChildren[0]; this.Show(); this.SettingImages(this.rootGameObject.transform.FindChild("fx_direct_hire_renewal")); }
private void SolRecruitDummySuccess(WWWItem _item, object _param) { Main_UI_SystemMessage.CloseUI(); if (this == null) { return; } if (_item.GetSafeBundle() == null || _item.GetSafeBundle().mainAsset == null) { return; } GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (gameObject == null) { return; } this._directionObj = (UnityEngine.Object.Instantiate(gameObject) as GameObject); this._directionObj.tag = NrTSingleton <UIDataManager> .Instance.UIBundleTag; Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = base.InteractivePanel.transform.position.z - 10f; this._directionObj.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this._directionObj, GUICamera.UILayer); GameObject gameObject2 = NkUtil.GetChild(this._directionObj.transform, "fx_direct_dragonhero").gameObject; if (gameObject2 != null) { gameObject2.SetActive(true); } if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this._directionObj); } Animation[] componentsInChildren = this._directionObj.GetComponentsInChildren <Animation>(); Animation[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { Animation animation = array[i]; if (!(animation == null)) { if (animation.cullingType != AnimationCullingType.AlwaysAnimate) { animation.cullingType = AnimationCullingType.AlwaysAnimate; } } } this.CreateCloseButton(); this.SetDirectionDummySoldier(); }
private void PlayAni(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_goPlayAni = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (this == null) { UnityEngine.Object.DestroyImmediate(this.m_goPlayAni); return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.m_goPlayAni.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.m_goPlayAni, GUICamera.UILayer); this.m_goAnimation = NkUtil.GetChild(this.m_goPlayAni.transform, "fx_dungeon").gameObject; this.m_goBackTexture = NkUtil.GetChild(this.m_goPlayAni.transform, "fx_plan_background").gameObject; if (this.m_goBackTexture != null && !string.IsNullOrEmpty(this.m_szBackImage)) { Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(this.m_szBackImage); if (texture == null) { NrTSingleton <UIImageBundleManager> .Instance.RequestBundleImage(this.m_szBackImage, new PostProcPerItem(this.SetBundleImage)); } else { Renderer component = this.m_goBackTexture.GetComponent <Renderer>(); if (component != null) { component.material.mainTexture = texture; } } } this.m_goPlayAni.SetActive(false); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_goPlayAni); } } } }
private void SetTouchEffcet(Vector2 ScreenPos) { GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate(this.pTouchEffectPrefab, Vector3.zero, Quaternion.identity); if (null == gameObject) { return; } Vector3 effectUIPos = base.GetEffectUIPos(ScreenPos); effectUIPos.z = 0f; gameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(gameObject, GUICamera.UILayer); UnityEngine.Object.Destroy(gameObject, 1f); }
public static void SetAllChildLayer(GameObject obj, int _layer) { if (null != obj) { for (int i = 0; i < obj.transform.childCount; i++) { NkUtil.SetAllChildLayer(obj.transform.GetChild(i).gameObject, _layer); } obj.transform.gameObject.layer = _layer; } else { Debug.LogWarning("KKIComment2011/5/25/ : SetAllChildActive if (null == obj)"); } }
private void SettingEffectPos() { if (this._directionEffect == null) { Debug.LogError("ERROR, DirectionEffectSetter.cs, SettingEffectPos(), _directionEffect is Null"); return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = this._owner.GetEffectUIPos(screenPos); this._directionEffect.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this._directionEffect, GUICamera.UILayer); if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this._directionEffect); } }
private void _funcDownloaded(IDownloadedItem wItem, object obj) { try { GameObject original = wItem.mainAsset as GameObject; this.m_gobjUseRecruitAroundEffect = (GameObject)UnityEngine.Object.Instantiate(original, Vector3.zero, Quaternion.identity); NkUtil.SetAllChildLayer(this.m_gobjUseRecruitAroundEffect, GUICamera.UILayer); Vector3 position = default(Vector3); position.x = base.GetLocation().x + 295f; position.y = base.GetLocation().y - 190f; position.z = this.m_DrawTexture_Item.transform.position.z; this.m_gobjUseRecruitAroundEffect.transform.position = position; this.m_gobjUseRecruitAroundEffect.transform.parent = base.InteractivePanel.gameObject.transform; this.m_gobjUseRecruitAroundEffect.transform.localRotation = Quaternion.Euler(0f, 0f, 0f); } catch (Exception message) { Debug.LogWarning(message); } }
public void SetFirstEffect() { if (Battle.BATTLE.ShowColosseumSummonEffect) { return; } if (this.m_goCardSummon != null) { UnityEngine.Object.Destroy(this.m_goCardSummon); this.m_goCardSummon = null; } if (Battle.BATTLE.ColosseumCardSummons == null) { this.m_bFirstEffectSet = true; Battle.BATTLE.ShowColosseumSummonEffect = true; this.m_fEndTime = Time.realtimeSinceStartup + 0.2f; } this.m_goCardSummon = (GameObject)UnityEngine.Object.Instantiate(Battle.BATTLE.ColosseumCardSummons, Vector3.zero, Quaternion.identity); NkUtil.SetAllChildLayer(this.m_goCardSummon, GUICamera.UILayer); Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); this.m_goCardSummon.transform.position = effectUIPos; this.m_goCardSummon.SetActive(true); Animation componentInChildren = this.m_goCardSummon.GetComponentInChildren <Animation>(); if (componentInChildren != null) { this.m_fEndTime = Time.realtimeSinceStartup + componentInChildren.clip.length - 0.2f; } else { this.m_fEndTime = Time.realtimeSinceStartup + 0.6f; } if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_goCardSummon); } this.m_bFirstEffectSet = true; Battle.BATTLE.ShowColosseumSummonEffect = true; }
private void SolComposeExtractResult(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.ExtractResultrootGameObject = (UnityEngine.Object.Instantiate(gameObject) as GameObject); if (null == this.ExtractResultrootGameObject) { return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.ExtractResultrootGameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.ExtractResultrootGameObject, GUICamera.UILayer); this.SetExtractBundlePlay(); } } }
private void SolRecruitSuccess(WWWItem _item, object _param) { Main_UI_SystemMessage.CloseUI(); if (this == null) { return; } if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.mainAsset as GameObject; if (null == gameObject) { return; } if (null != this.rootEffectGameObject) { UnityEngine.Object.Destroy(this.rootEffectGameObject); } this.rootEffectGameObject = (GameObject)UnityEngine.Object.Instantiate(gameObject, Vector3.zero, Quaternion.identity); if (null == this.rootEffectGameObject) { return; } Vector2 screenPos = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); Vector3 effectUIPos = base.GetEffectUIPos(screenPos); effectUIPos.z = 300f; this.rootEffectGameObject.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.rootEffectGameObject, GUICamera.UILayer); this.rootEffectGameObject.SetActive(false); this.SetTextureBundle(); this.SetElementSuccessDlgGUI(); this.bEffectUpdate = true; if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootEffectGameObject); } } }
private void SetActionDirection(WWWItem _item, object _param) { if (null != _item.GetSafeBundle() && null != _item.GetSafeBundle().mainAsset) { GameObject gameObject = _item.GetSafeBundle().mainAsset as GameObject; if (null != gameObject) { this.m_EffectDirection = (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.m_EffectDirection.transform.position = effectUIPos; NkUtil.SetAllChildLayer(this.m_EffectDirection, GUICamera.UILayer); base.InteractivePanel.MakeChild(this.m_EffectDirection); this.fStartTime_ShowEffect = Time.realtimeSinceStartup; this.m_bActionShowDirection = true; if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.m_EffectDirection); } } } }
private Transform GetBillboardTargetObj() { if (this._costumeCharSetter._CostumeChar == null) { return(null); } if (this._effectBillboardTargetObj == null) { GameObject gameObject = GameObject.Find("BillBoardTarget"); if (gameObject != null) { this._effectBillboardTargetObj = gameObject.transform; } } if (this._effectBillboardTargetObj == null) { this._effectBillboardTargetObj = new GameObject().transform; this._effectBillboardTargetObj.transform.name = "BillBoardTarget"; } NkUtil.SetAllChildLayer(this._effectBillboardTargetObj.gameObject, GUICamera.UILayer); this._effectBillboardTargetObj.localPosition = new Vector3(this._costumeCharSetter._CostumeChar.transform.localPosition.x, this._costumeCharSetter._CostumeChar.transform.localPosition.y, this._costumeCharSetter._CostumeChar.transform.localPosition.z - 1000f); return(this._effectBillboardTargetObj); }
private void LoadChar(string strfilename) { if (this.pCharPrefab != null) { UnityEngine.Object.DestroyImmediate(this.pCharPrefab); this.pCharPrefab = null; } this.pCharPrefab = (CResources.LoadClone(NrTSingleton <UIDataManager> .Instance.FilePath + strfilename) as GameObject); CResources.Delete(NrTSingleton <UIDataManager> .Instance.FilePath + strfilename); GameObject gameObject = GameObject.Find("UI Camera"); if (gameObject != null) { Camera componentInChildren = gameObject.GetComponentInChildren <Camera>(); if (componentInChildren != null) { Vector3 location = this.m_txTouchArea.GetLocation(); location.x = this.m_txTouchArea.GetLocation().x + this.m_txTouchArea.GetSize().x / 2f; location.y = -(this.m_txTouchArea.GetLocationY() + this.m_txTouchArea.GetSize().y / 2f); location.z = 560f; this.pCharPrefab.transform.position = location; Transform transform = this.pCharPrefab.transform.Find("Loding Char"); if (transform != null) { this.pRealChar = transform.gameObject; } Collider[] componentsInChildren = this.pCharPrefab.GetComponentsInChildren <Collider>(); Collider[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { Collider collider = array[i]; collider.enabled = false; } NkUtil.SetAllChildLayer(this.pCharPrefab, GUICamera.UILayer); } } }