private void OnMouseUpAsButton() { if (NkInputManager.GetMouseButtonUp(0) && !this.m_bSelectCard) { if (SendPacket.GetInstance().IsBlockSendPacket()) { return; } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "WIN-CARD-SUCCESS", true); this.m_bSelectCard = true; int iSelectIndex = 0; if ("card1" == base.gameObject.name) { iSelectIndex = 0; } if ("card2" == base.gameObject.name) { iSelectIndex = 1; } if ("card3" == base.gameObject.name) { iSelectIndex = 2; } if ("card4" == base.gameObject.name) { iSelectIndex = 3; } if (this.m_pkDlg != null) { this.m_pkDlg.ClickRewardCardButton(iSelectIndex); } } }
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; } } }
public override void OnClose() { NrTSingleton <CRightClickMenu> .Instance.CloseUI(CRightClickMenu.CLOSEOPTION.CLICK); NkInputManager.IsInputMode = true; base.OnClose(); NrSound.ImmedatePlay("UI_SFX", "GUILD", "CLOSE"); }
public void SwapTurn(bool _PlayerTurn, float _Time) { this.m_PlayerTurn = _PlayerTurn; this.m_TurnTime = _Time; this.m_TurnTimeEnd = Time.realtimeSinceStartup + this.m_TurnTime; this.m_TurnSwapTime = Time.realtimeSinceStartup; this.SetVisibleFlag(false); Vector2 screenPos = new Vector2(GUICamera.width / 2f, GUICamera.height / 2f); if (EffectDefine.IsValidParent(this.m_EffectTurnMyAlly) && this.m_PlayerTurn) { this.m_EffectTurnMyAlly = NrTSingleton <NkEffectManager> .Instance.CreateEffectUI("FX_PLAYER_PHASE", screenPos, new NkEffectUnit.DeleteCallBack(this.TurnEffectDeleteCallBack)); } if (EffectDefine.IsValidParent(this.m_EffectTurnEnemyAlly) && !this.m_PlayerTurn) { this.m_EffectTurnEnemyAlly = NrTSingleton <NkEffectManager> .Instance.CreateEffectUI("FX_ENEMY_PHASE", screenPos, new NkEffectUnit.DeleteCallBack(this.TurnEffectDeleteCallBack)); } GameObject gameObject; GameObject gameObject2; if (this.m_PlayerTurn) { gameObject = this.m_EffectTurnMyAlly; gameObject2 = this.m_EffectTurnEnemyAlly; } else { gameObject = this.m_EffectTurnEnemyAlly; gameObject2 = this.m_EffectTurnMyAlly; } if (null != gameObject) { Vector2 screenPos2 = new Vector2((float)(Screen.width / 2), (float)(Screen.height / 2)); gameObject.transform.position = base.GetEffectUIPos(screenPos2); gameObject.layer = TsLayer.GUI; gameObject.SetActive(true); Animation componentInChildren = gameObject.GetComponentInChildren <Animation>(); if (componentInChildren != null) { componentInChildren.cullingType = AnimationCullingType.AlwaysAnimate; } } if (null != gameObject2) { Vector2 screenPos3 = new Vector2((float)(Screen.width / 2), (float)(-(float)Screen.height / 2)); gameObject2.transform.position = base.GetEffectUIPos(screenPos3); gameObject2.layer = TsLayer.GUI; gameObject2.SetActive(false); } NrSound.ImmedatePlay("UI_SFX", "BATTLE", (!_PlayerTurn) ? "YOURTURN" : "MYTURN"); }
public void LinkData(int BattleSRewardUnique) { if (BattleSRewardUnique > 0) { this.m_CloseDlg = false; this.m_dtWinLose.Visible = false; this.m_ChildDlg.ShowSRewardDlg(BattleSRewardUnique); } else if (BattleSRewardUnique < 0) { if (!this.m_CloseDlg) { this.m_OpenTime = Time.realtimeSinceStartup; this.m_dtWinLose.Visible = true; } this.m_ChildDlg._LinkBasicData(); this.m_ChildDlg.LinkData(); if (this.m_ChildDlg.m_bWin) { NrSound.ImmedatePlay("UI_SFX", "BATTLE", "WIN", true); this.m_dtWinLose.SetTexture("Bat_I_ResultWin"); } else { NrSound.ImmedatePlay("UI_SFX", "BATTLE", "LOSE", true); this.m_dtWinLose.SetTexture("Bat_I_ResultLose"); } if (!this.m_bClearMiddleStage && !this.m_ChildDlg.RankEffectSet) { NrTSingleton <NkClientLogic> .Instance.SetClearMiddleStage(); this.m_bClearMiddleStage = true; } } else { this.m_CloseDlg = true; this.m_ChildDlg._LinkBasicData(); this.m_ChildDlg.LinkData(); if (this.m_ChildDlg.m_bWin) { this.m_dtWinLose.SetTexture("Bat_I_ResultWin"); } else { this.m_dtWinLose.SetTexture("Bat_I_ResultLose"); } this.ShowResultFx(); } }
public static void GoToBlurNormalBattle() { NrCharUser nrCharUser = NrTSingleton <NkCharManager> .Instance.GetChar(1) as NrCharUser; if (nrCharUser != null && nrCharUser.Get3DChar() != null) { GameObject rootGameObject = nrCharUser.Get3DChar().GetRootGameObject(); if (rootGameObject) { rootGameObject.AddComponent <NmMotionBlurLoading>(); } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "ENTER", true); } }
public override void OnClose() { if (null != this.rootGameObject) { UnityEngine.Object.DestroyObject(this.rootGameObject.gameObject); } if (null != this.ExtractResultrootGameObject) { UnityEngine.Object.DestroyObject(this.ExtractResultrootGameObject.gameObject); } if (this.m_SolComposeMainType != SOLCOMPOSE_TYPE.EXTRACT) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.SOLCOMPOSE_SUCCESS_DLG); if (this.m_ComposeType == 1) { SolComposeSuccessDlg solComposeSuccessDlg = (SolComposeSuccessDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_SUCCESS_DLG); if (solComposeSuccessDlg != null) { solComposeSuccessDlg.LoadSolComposeSuccessBundle(); } } else if (this.m_ComposeType == 3) { SolComposeSuccessDlg solComposeSuccessDlg2 = (SolComposeSuccessDlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.SOLCOMPOSE_SUCCESS_DLG); if (solComposeSuccessDlg2 != null) { solComposeSuccessDlg2.LoadSolLevelSuccessBundle(); } } NrSound.ImmedatePlay("UI_SFX", "MERCENARY-COMPOSE", "SUCCESS"); } UIDataManager.MuteSound(false); if (this._closeCallback != null) { this._closeCallback(); } base.OnClose(); }
private void OnMouseEnter() { if (Input.touchCount > 0 && Input.GetTouch(0).phase != TouchPhase.Began) { return; } if (this.m_fStartBlockTime + this.m_fBlockTime > Time.time) { return; } Animation component = base.gameObject.GetComponent <Animation>(); if (component != null) { if (component.isPlaying) { component.Stop(); } NrSound.ImmedatePlay("UI_SFX", "BATTLE", "WIN-CARD-SELECT", true); string animation = string.Format("card{0}_on", (this.m_nIndex + 1).ToString()); component.Play(animation); } }
public void SetInfo() { NrMyCharInfo myCharInfo = NrTSingleton <NkCharManager> .Instance.GetMyCharInfo(); NrPersonInfoUser charPersonInfo = NrTSingleton <NkCharManager> .Instance.GetCharPersonInfo(1); this.m_laGradeRank.Text = myCharInfo.GetColosseumMyGradeRank().ToString(); this.m_laCharName.Text = charPersonInfo.GetCharName(); int num = 1000 + myCharInfo.ColosseumGradePoint; this.m_laGradePoint.Text = num.ToString(); if (this.m_OldGradeRank <= 0 || this.m_OldGradeRank > myCharInfo.GetColosseumMyGradeRank()) { NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_UI_RANKUP", this.m_dtRankChange, this.m_dtRankChange.GetSize()); NrSound.ImmedatePlay("UI_SFX", "COLOSSEUM", "RANKUP"); } else { NrTSingleton <FormsManager> .Instance.AttachEffectKey("FX_UI_RANKDOWN", this.m_dtRankChange, this.m_dtRankChange.GetSize()); NrSound.ImmedatePlay("UI_SFX", "COLOSSEUM", "RANKDOWN"); } }
public void SetData(byte bPreGrade, long lPreLevel, long lGetExp, NkSoldierInfo kSolInfo) { string text = string.Empty; string text2 = string.Empty; string text3 = string.Empty; int charkind = 0; int solgrade = 0; if (kSolInfo != null) { text = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1731"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text, new object[] { text, "count", lGetExp }); if (lPreLevel != (long)kSolInfo.GetLevel()) { text2 = NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface("1732"); NrTSingleton <CTextParser> .Instance.ReplaceParam(ref text2, new object[] { text2, "count1", lPreLevel, "count2", kSolInfo.GetLevel() }); } BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)bPreGrade); CHARKIND_SOLSTATINFO kSolStatInfo = cHARKIND_SOLGRADEINFO.kSolStatInfo; BASE_SOLGRADEINFO cHARKIND_SOLGRADEINFO2 = kSolInfo.GetCharKindInfo().GetCHARKIND_SOLGRADEINFO((int)kSolInfo.GetGrade()); CHARKIND_SOLSTATINFO kSolStatInfo2 = cHARKIND_SOLGRADEINFO2.kSolStatInfo; text3 = kSolInfo.GetName(); charkind = kSolInfo.GetCharKind(); solgrade = (int)kSolInfo.GetGrade(); NrSound.ImmedatePlay("UI_SFX", "QUEST", "SOLDIERRECRUIT"); short[] propertys = this.GetPropertys(kSolStatInfo, kSolStatInfo2); if (propertys.Length != this.arPerpertyKeys.Length) { Debug.LogError(string.Format("Property size V:{0} != S:{1}", propertys.Length, this.arPerpertyKeys.Length)); return; } for (int i = 0; i < 4; i++) { this.lbPropertyText[i].Visible = false; this.lbPropertyValue[i].Visible = false; } int num = 0; for (int j = 0; j < propertys.Length; j++) { string strTextKey = this.arPerpertyKeys[j]; short num2 = propertys[j]; if (0 < num2) { this.lbPropertyText[num].Visible = true; this.lbPropertyText[num].SetText(NrTSingleton <NrTextMgr> .Instance.GetTextFromInterface(strTextKey)); this.lbPropertyValue[num].Visible = true; this.lbPropertyValue[num].SetText(num2.ToString()); num++; if (num > 4) { Debug.LogError(string.Format("VALID_PROPERTY_MAX {0}", j)); break; } } } } this.itSoldier.SetSolImageTexure(eCharImageType.LARGE, charkind, solgrade); this.lbAddExp.SetText(text); this.lbAddLevel.SetText(text2); this.lbName.SetText(text3); }
public override void OnLoad() { NrSound.ImmedatePlay("UI_SFX", "GUILD", "OPEN"); }
public override void OnClose() { base.OnClose(); NrSound.ImmedatePlay("UI_SFX", "GUILD", "CLOSE"); }
public static void GoToNormalBattle() { NrSound.ImmedatePlay("UI_SFX", "BATTLE", "ENTER", true); NmMotionBlurLoading.ToBattle(); }
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 static void ImmedatePlay(string domainKey, string categoryKey, string audioKey) { NrSound.ImmedatePlay(domainKey, categoryKey, audioKey, false); }