public bool SetRankTextTexture(string strfaceImage, string faceObjName) { if (this.SubEffectGameObject == null) { return(false); } GameObject gameObject = NkUtil.GetChild(this.SubEffectGameObject.transform, faceObjName).gameObject; if (null != gameObject) { Texture2D texture = NrTSingleton <UIImageBundleManager> .Instance.GetTexture(strfaceImage); if (null != texture) { Material material = new Material(Shader.Find("Transparent/Vertex Colored" + NrTSingleton <UIDataManager> .Instance.AddFilePath)); if (null != material) { material.mainTexture = texture; if (null != gameObject.renderer) { gameObject.renderer.sharedMaterial = material; return(true); } } } } return(true); }
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 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 CameraDataRestore() { if (!NrBattleCamera.m_BackupCameraData.checkbackup) { return; } GameObject gameObject = TsSceneSwitcher.Instance._GetSwitchData_RootSceneGO(TsSceneSwitcher.ESceneType.BattleScene); if (gameObject == null) { return; } Transform child = NkUtil.GetChild(gameObject.transform, "Main Camera"); if (child == null) { return; } maxCamera component = child.GetComponent <maxCamera>(); component.distance = NrBattleCamera.m_BackupCameraData.distance; component.xDeg = NrBattleCamera.m_BackupCameraData.xDeg; component.yDeg = NrBattleCamera.m_BackupCameraData.yDeg; component.currentDistance = NrBattleCamera.m_BackupCameraData.currentDistance; component.desiredDistance = NrBattleCamera.m_BackupCameraData.desiredDistance; component.m_nCameraLevel = NrBattleCamera.m_BackupCameraData.CameraLevel; NrBattleCamera.m_BackupCameraData.trParent = null; component.RestoreBattleCamera(); }
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_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 SettingDirectionCharPortrait() { if (this._directionEffect == null) { Debug.LogError("ERROR, DirectionEffectSetter.cs, SettingDirectionCharPortrait(), CheckEffectAni is Null"); return; } SolCombinationInfo_Data solCombinationDataByUniqeKey = NrTSingleton <NrSolCombinationSkillInfoManager> .Instance.GetSolCombinationDataByUniqeKey(this._solCombinationUniqeKey); if (solCombinationDataByUniqeKey == null || solCombinationDataByUniqeKey.m_szCombinationIsCharCode == null) { return; } int solCombinationCharCount = this.GetSolCombinationCharCount(solCombinationDataByUniqeKey.m_szCombinationIsCharCode); for (int i = 0; i < solCombinationCharCount; i++) { Transform child = NkUtil.GetChild(this._directionEffect.transform, "fx_hero_0" + (i + 1).ToString()); if (!(child == null)) { child.gameObject.SetActive(true); TsMeshCharPortraitSetter tsMeshCharPortraitSetter = child.gameObject.AddComponent <TsMeshCharPortraitSetter>(); tsMeshCharPortraitSetter.SetTexture(solCombinationDataByUniqeKey.m_szCombinationIsCharCode[i]); } } }
public string GetPartFileName(string strPartPath, string strPartCode, bool bBasePart, int itemunique) { string text = "000"; if (!bBasePart) { ITEMINFO itemInfo = NrTSingleton <ItemManager> .Instance.GetItemInfo(itemunique); if (itemInfo != null) { text = itemInfo.m_strModelPath; } } else { text = itemunique.ToString(); } text = NkUtil.MakeCode(text); return(string.Format("{0}/{1}_{2}_{3}", new object[] { strPartPath, this.m_pkTargetKind.GetBundlePath(), strPartCode, text })); }
private void SetImageAtTarget(Texture2D texture, string childObjName) { if (texture == null || string.IsNullOrEmpty(childObjName)) { return; } GameObject gameObject = NkUtil.GetChild(this._directionObj.transform, childObjName).gameObject; if (gameObject == null) { return; } Material material = new Material(Shader.Find("Transparent/Vertex Colored" + NrTSingleton <UIDataManager> .Instance.AddFilePath)); if (material == null) { return; } material.mainTexture = texture; if (gameObject.renderer == null) { return; } gameObject.renderer.sharedMaterial = material; }
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 OnItemChange(NkSoldierInfo kSoldier, int itemindex, GameObject kGameObj) { if (kSoldier == null || null == kGameObj) { return; } eEQUIP_ITEM itempos = eEQUIP_ITEM.EQUIP_ITEM_MAX; if (itemindex == 3) { itempos = eEQUIP_ITEM.EQUIP_WEAPON1; } ITEM equipItem = kSoldier.GetEquipItem((int)itempos); if (equipItem != null) { int rank = equipItem.m_nOption[2]; string strName = ItemManager.RankStateString(rank); Transform childContains = NkUtil.GetChildContains(kGameObj.transform, strName); if (null != childContains) { Transform transform = kGameObj.transform; childContains.parent = null; int childCount = transform.childCount; for (int i = 0; i < childCount; i++) { Transform child = transform.GetChild(0); UnityEngine.Object.DestroyImmediate(child.gameObject); } childContains.parent = transform; } } }
private void SetItemText() { if (!this.m_bComposeTranscendence) { if (this.SubEffectGameObject == null) { return; } GameObject gameObject = NkUtil.GetChild(this.SubEffectGameObject.transform, "fx_text_area").gameObject; if (gameObject != null) { Vector3 position = default(Vector3); position.x = gameObject.transform.position.x - 140f; position.y = gameObject.transform.position.y + 30f; position.z = gameObject.transform.position.z; this.solMovieText.gameObject.transform.position = position; string empty = string.Empty; NrTSingleton <CTextParser> .Instance.ReplaceParam(ref empty, new object[] { NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("2837"), "Count", this.m_i32FailItemNum.ToString() }); this.solMovieText.Visible = true; this.solMovieText.SetText(empty); this.solMovieText.SetCharacterSize(38f); this.solMovieText.SetMultiLine(false); } } }
public void SetComposeUpgrade() { this.m_bEffectUpdate = true; if (null == this.rootEffectGameObject) { return; } this.SubEffectGameObject = null; string strName = "fx_cut01"; string strName2 = "fx_cut02"; this.rootEffectGameObject.SetActive(false); GameObject gameObject = NkUtil.GetChild(this.rootEffectGameObject.transform, strName).gameObject; if (gameObject != null && this.m_bComposeTranscendence) { this.SubEffectGameObject = gameObject; this.SetLegendCardActive(gameObject); } GameObject gameObject2 = NkUtil.GetChild(this.rootEffectGameObject.transform, strName2).gameObject; if (gameObject2 != null && !this.m_bComposeTranscendence) { this.SubEffectGameObject = gameObject2; this.SetLegendCardActive(gameObject2); } }
public void SetLoopPlay() { if (null == this.rootEffectGameObject) { return; } if (!this.m_bComposeTranscendence) { return; } GameObject gameObject = NkUtil.GetChild(this.rootEffectGameObject.transform, "loops").gameObject; if (gameObject != null) { gameObject.SetActive(true); } GameObject gameObject2 = NkUtil.GetChild(this.rootEffectGameObject.transform, "square_mesh_loop_2").gameObject; if (gameObject2 != null) { gameObject2.SetActive(false); } if (TsPlatform.IsMobile && TsPlatform.IsEditor) { NrTSingleton <NkClientLogic> .Instance.SetEditorShaderConvert(ref this.rootEffectGameObject); } }
public void FinishDownloadWeaponTrail(IDownloadedItem wItem, object kParamObj) { try { if (!(this.m_kBaseObject == null)) { if (!wItem.isCanceled) { if (wItem.GetSafeBundle() == null) { TsLog.LogWarning("wItem.mainAsset is null -> Path = {0}", new object[] { wItem.assetPath }); } else { GameObject original = wItem.GetSafeBundle().mainAsset as GameObject; this.m_kWeaponTrailObject = (GameObject)UnityEngine.Object.Instantiate(original); this.m_kWeaponTrailObject.transform.parent = this.m_kBaseObject.transform; this.m_kWeaponTrailObject.transform.localPosition = Vector3.zero; this.m_kWeaponTrailObject.SetActive(true); NkUtil.SetAllChildActive(this.m_kWeaponTrailObject, false, true); } } } } catch (Exception obj) { TsLog.LogError(obj); } }
public static bool SetSHA1Hash(string sourceString, ref char[] hashData) { string text = NkUtil.EncryptPassword(sourceString); hashData = text.ToCharArray(); return(true); }
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 UpdateLineMove() { if (this.m_EffectUnit.CastedTarget.m_goEffect == null) { return; } float num = this.m_fBulletEndTime - this.m_fStartTime; float num2 = Time.time - this.m_fStartTime; if (this.m_BulletInfo.HIT_TYPE == eBULLET_HIT_TYPE.eBULLET_HIT_TYPE_CHAR) { this.m_HitPosEnd = this.m_TargetChar.CastedTarget.GetCenterPosition(); } Vector3 position = Vector3.Lerp(this.m_PosStart, this.m_BulletPosEnd, num2 / num); if (!this.m_EffectUnit.CastedTarget.m_goEffect.activeInHierarchy) { this.m_EffectUnit.CastedTarget.m_goEffect.SetActive(true); if (this.m_EffectUnit.CastedTarget.m_TrailerRenderer != null) { this.m_EffectUnit.CastedTarget.m_TrailerRenderer.enabled = true; } NkUtil.SetAllChildActive(this.m_EffectUnit.CastedTarget.m_goEffect, true); } if (this.m_EffectUnit.IsAlive) { this.m_EffectUnit.CastedTarget.m_goEffect.transform.position = position; Vector3 a = new Vector3(this.m_BulletPosEnd.x, this.m_PosStart.y, this.m_BulletPosEnd.z); Vector3 forward = a - this.m_PosStart; Quaternion localRotation = Quaternion.LookRotation(forward); this.m_EffectUnit.CastedTarget.m_goEffect.transform.localRotation = localRotation; } }
private void SetUVPosition(int nNumberCount, int nDamage, bool bDodge, NkBattleDamage.eDAMAGEMODE eMode) { if (bDodge) { return; } char[] array = nDamage.ToString().ToCharArray(); for (int i = 0; i < nNumberCount; i++) { int num = int.Parse(array[i].ToString()); string strName = string.Format("number{0}", (i + 1).ToString()); Transform child = NkUtil.GetChild(this.m_goFxFont.transform, strName); if (child != null) { GameObject gameObject = child.gameObject; if (gameObject) { Rect rect = new Rect(NkBattleDamage.m_rtDamage[(int)eMode]); rect.x += rect.width * (float)num; Vector2[] uv = new Vector2[] { new Vector2(rect.x, rect.y), new Vector2(rect.x + rect.width, rect.y - rect.height), new Vector2(rect.x, rect.y - rect.height), new Vector2(rect.x + rect.width, rect.y) }; MeshFilter component = gameObject.GetComponent <MeshFilter>(); if (component != null) { component.mesh.uv = uv; } } } } }
private void UpdateCurveMove() { float num = Time.time - this.m_fStartTime; Vector3 position; position.x = this.m_PosStart.x + this.m_initVelVector.x * num; position.y = this.m_PosStart.y + this.m_initVelVector.y * num - 0.5f * NkBulletUnit.gravitationalConstant * num * num; position.z = this.m_PosStart.z + this.m_initVelVector.z * num; if (!this.m_EffectUnit.CastedTarget.m_goEffect.activeInHierarchy) { this.m_EffectUnit.CastedTarget.m_goEffect.SetActive(true); if (this.m_EffectUnit.CastedTarget.m_TrailerRenderer != null) { this.m_EffectUnit.CastedTarget.m_TrailerRenderer.enabled = true; } NkUtil.SetAllChildActive(this.m_EffectUnit.CastedTarget.m_goEffect, true); } if (this.m_EffectUnit.IsAlive) { this.m_EffectUnit.CastedTarget.m_goEffect.transform.position = position; Vector3 a = new Vector3(this.m_HitPosEnd.x, this.m_PosStart.y, this.m_HitPosEnd.z); Vector3 forward = a - this.m_PosStart; Quaternion localRotation = Quaternion.LookRotation(forward); this.m_EffectUnit.CastedTarget.m_goEffect.transform.localRotation = localRotation; } }
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 HideEffect() { if (this._costumeChar == null) { return; } Transform child = NkUtil.GetChild(this._costumeChar.transform, "fx_dummy"); if (child == null) { return; } MeshRenderer[] componentsInChildren = child.GetComponentsInChildren <MeshRenderer>(); if (componentsInChildren == null) { return; } MeshRenderer[] array = componentsInChildren; for (int i = 0; i < array.Length; i++) { MeshRenderer meshRenderer = array[i]; if (!(meshRenderer == null)) { meshRenderer.enabled = false; } } }
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 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); }
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 Start() { RenderSettings.fog = true; this.m_Color = new Color[8]; this.m_Rect = new Rect[8]; this.m_Color[0] = NkUtil.GetColorA(167, 167, 151, 255); this.m_Rect[0] = new Rect(0f, 0f, 0f, 0f); this.m_Color[1] = NkUtil.GetColorA(130, 151, 167, 255); this.m_Rect[1] = new Rect(0f, 0f, 700f, 1600f); this.m_Color[2] = NkUtil.GetColorA(167, 130, 130, 255); this.m_Rect[2] = new Rect(1400f, 950f, 210f, 300f); this.m_Color[3] = NkUtil.GetColorA(167, 130, 130, 255); this.m_Rect[3] = new Rect(1270f, 1030f, 300f, 180f); this.m_Color[4] = NkUtil.GetColorA(167, 130, 130, 255); this.m_Rect[4] = new Rect(1450f, 1200f, 100f, 100f); this.m_Color[5] = NkUtil.GetColorA(167, 130, 130, 255); this.m_Rect[5] = new Rect(750f, 900f, 280f, 200f); this.m_Color[6] = NkUtil.GetColorA(136, 167, 130, 255); this.m_Rect[6] = new Rect(700f, 0f, 1350f, 900f); this.m_Color[7] = NkUtil.GetColorA(90, 70, 25, 255); this.m_Rect[7] = new Rect(800f, 1170f, 700f, 600f); this.m_CurColor = this.m_Color[0]; this.m_DestColor = this.m_Color[0]; this.m_pkUser = null; }
public void SetShow(bool bShow) { if (null != this.m_goEffect) { NkUtil.SetAllChildActive(this.m_goEffect, bShow); } }
private void _AssignBaseObject(GameObject Base) { if (this.m_kBaseObject) { UnityEngine.Object.Destroy(this.m_kBaseObject); this.m_kBaseObject = null; } this.m_kBaseObject = Base; this.m_kBaseObject.name = this.m_szCharCode; if (null == this.m_kBaseObject) { Debug.LogError("TTTTTT - m_kBaseObj is null"); } if (null == this.m_kRootGameObj) { Debug.LogError("char bone root go is null"); this.m_kBaseObject.transform.parent = null; } else { this.m_kBaseObject.transform.parent = this.m_kRootGameObj.transform; this.m_kBaseObject.transform.localPosition = new Vector3(0f, -0.07f, 0f); this.m_kBaseObject.transform.localRotation = Quaternion.identity; } if (this._RemoveScriptAction != null) { this._RemoveScriptAction(); } NkUtil.SetAllChildActive(this.m_kBaseObject, true); this.m_kBaseObject.animation.enabled = true; base.downloadCounter--; }
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 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); } } } }