private void CloseUpdate() { if (this.m_fStartTime == 0f) { return; } float num = Time.time - this.m_fStartTime; if (num >= this.m_fAniTime) { if (num <= this.m_fAniTime || num >= this.m_fAniTime + this.m_fWaitTime) { if (num > this.m_fAniTime + this.m_fWaitTime && num < this.m_fAniTime + this.m_fWaitTime + this.m_fAlphaTime) { float alpha = Mathf.Lerp(1f, 0f, (num - (this.m_fAniTime + this.m_fWaitTime)) / this.m_fAlphaTime); base.SetAlpha(alpha); } else { Battle_Control_Dlg battle_Control_Dlg = (Battle_Control_Dlg)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG); if (battle_Control_Dlg != null) { battle_Control_Dlg.SetAngergaugeFX_Click(false); } this.Close(); } } } }
public void AudioPlay(string strMute) { UnityEngine.Debug.LogWarning("AutoPlay SET: " + strMute); bool bMute = strMute == "1"; CommonTasks.MuteAudioOnOff(bMute); if (strMute == "0") { if (Scene.CurScene <= Scene.Type.LOGIN) { NmMainFrameWork.AddBGM(); NrTSingleton <NrMainSystem> .Instance.m_bIsShowBI = true; NrTSingleton <PreloadDataTableMgr> .Instance.StopPreLoadTable(); } else if (Scene.CurScene == Scene.Type.BATTLE) { Battle_ResultTutorialDlg battle_ResultTutorialDlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_RESULT_TUTORIAL_DLG) as Battle_ResultTutorialDlg; if (battle_ResultTutorialDlg != null) { if (!battle_ResultTutorialDlg.Visible) { battle_ResultTutorialDlg.Show(); } battle_ResultTutorialDlg.OpenTime = 0f; battle_ResultTutorialDlg.PlayMovie = false; battle_ResultTutorialDlg.m_bUpdateCheck = true; battle_ResultTutorialDlg.MovieTime = 0f; } if (Battle.BATTLE.BattleRoomtype == eBATTLE_ROOMTYPE.eBATTLE_ROOMTYPE_MYTHRAID) { Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg != null) { battle_Control_Dlg.MovieEnd(); } } } else if (NrTSingleton <NkQuestManager> .Instance.bPlayMovie) { NpcTalkUI_DLG npcTalkUI_DLG = (NpcTalkUI_DLG)NrTSingleton <FormsManager> .Instance.GetForm(G_ID.NPCTALK_DLG); if (npcTalkUI_DLG != null) { npcTalkUI_DLG.Show(); } NrTSingleton <NkQuestManager> .Instance.bPlayMovie = false; } NmMainFrameWork.m_bMoviePlay = false; } else { this.m_fBITime = Time.time + 15f; } }
public void _SetDialogPos() { Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg == null) { base.SetLocation(0f, GUICamera.height - base.GetSizeY()); return; } float x = battle_Control_Dlg.GetLocationX() - base.GetSizeX(); float y = GUICamera.height - base.GetSizeY(); base.SetLocation(x, y); }
public void SetBattleTutorial(int value1, int value2, NkBattleChar pkBattleChar) { base.SetShowLayer(0, false); base.SetShowLayer(1, true); this.SetTextBattle(value1.ToString()); if (value1 == 101010703) { Vector2 zero = Vector2.zero; Vector2 zero2 = Vector2.zero; if (pkBattleChar != null) { this.m_TargetChar = pkBattleChar; Vector3 pos = Vector3.zero; pos = this.m_TargetChar.CastedTarget.Get3DChar().GetRootGameObject().transform.position; pos = GUICamera.WorldToEZ(pos); zero = new Vector2(pos.x, pos.y - 150f); zero2 = new Vector2(pos.x - 20f, pos.y - 190f); } else { zero = new Vector2(GUICamera.width / 2f + this.m_Touch.width, GUICamera.height / 2f - 150f); zero2 = new Vector2(GUICamera.width / 2f, GUICamera.height / 2f - 190f); } this.Move(zero, zero2); this._BG.UsedCollider(false); } else if (value1 == 101010701) { Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg == null) { return; } Vector2 skillButtonPos = battle_Control_Dlg.GetSkillButtonPos(); Vector3 v = new Vector2(skillButtonPos.x + 60f, skillButtonPos.y - 25f); Vector2 x = new Vector2(skillButtonPos.x - this.m_HelpText.GetSize().x - 30f, skillButtonPos.y - 55f); this.Move(v, x); this._BG.UsedCollider(false); } }
public override void Update() { NrTSingleton <NrUpdateProcessor> .Instance.MainUpdate(); if (NkInputManager.GetKeyDown(KeyCode.Escape)) { this.m_ResolutionWindow = !this.m_ResolutionWindow; } if (!TsPlatform.IsEditor || NkInputManager.GetKeyUp(KeyCode.Alpha3)) { } if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha3)) { TsLog.LogError("GetMonoHeapSize = {0}, GetMonoUsedSize = {1} , usedHeapSize = {2} ", new object[] { Profiler.GetMonoHeapSize(), Profiler.GetMonoUsedSize(), Profiler.usedHeapSize }); MemoryCollection.Print(MemoryCollection.Mode.LoadedAll); } if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha2)) { NrTSingleton <NrMainSystem> .Instance.CleanUpImmediate(); } if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha4)) { NrTSingleton <FormsManager> .Instance.DeleteAll(); } if (!TsPlatform.IsEditor || !NkInputManager.GetKey(KeyCode.LeftShift) || NkInputManager.GetKeyUp(KeyCode.Alpha0)) { } if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKeyUp(KeyCode.Alpha5)) { TsPlatform.FileLog("AppMemory : " + NrTSingleton <NrMainSystem> .Instance.AppMemory); } if (TsPlatform.IsMobile && !TsPlatform.IsEditor && Input.GetKeyUp(KeyCode.Escape)) { string text = "FromESC"; MsgBoxUI msgBoxUI = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI != null) { string b = msgBoxUI.GetYesObject() as string; if (text != null && text == b && this.IsBattleStop()) { Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg != null) { battle_Control_Dlg.bESC = false; } this.BattleStopStart(false); } } bool flag = NrTSingleton <FormsManager> .Instance.CloseFormESC(); if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.ITEMMALL_POPUPSHOP_DLG)) { return; } if (NrTSingleton <FormsManager> .Instance.IsForm(G_ID.TOASTMSG_DLG)) { MsgBoxUI msgBoxUI2 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI2 != null) { this.BattleStopStart(false); if (Battle.BATTLE != null && !NrTSingleton <ContentsLimitManager> .Instance.IsBattleStopLimit()) { Battle_Control_Dlg battle_Control_Dlg2 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg2 != null) { battle_Control_Dlg2.ShowRetreatWithCancel(); } } else { msgBoxUI2.SetMsg(new YesDelegate(this.EscQuitGame), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("7"), NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("38"), eMsgType.MB_OK_CANCEL, 2); } } } else if (!flag && Scene.CurScene != Scene.Type.SELECTCHAR) { MsgBoxUI msgBoxUI3 = NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.MSGBOX_DLG) as MsgBoxUI; if (msgBoxUI3 != null) { this.BattleStopStart(true); if (Battle.BATTLE != null && !NrTSingleton <ContentsLimitManager> .Instance.IsBattleStopLimit()) { Battle_Control_Dlg battle_Control_Dlg3 = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg3 != null) { battle_Control_Dlg3.ShowRetreatWithCancel(); } } else { msgBoxUI3.SetMsg(new YesDelegate(this.EscQuitGame), null, NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("7"), NrTSingleton <NrTextMgr> .Instance.GetTextFromPreloadText("38"), eMsgType.MB_OK_CANCEL, 2); } } NrTSingleton <FiveRocksEventManager> .Instance.Placement("backbutton_click"); } } if (NkInputManager.GetKeyDown(KeyCode.Alpha1) && NkInputManager.GetKey(KeyCode.RightShift)) { this.m_bSwitchMyCharInfoGUI = !this.m_bSwitchMyCharInfoGUI; } }
public void InputKeyBoard() { if (this.m_Battle.CastedTarget == null) { return; } if (this.m_Battle.CastedTarget.InputControlTrigger) { return; } if (NrTSingleton <UIManager> .Instance.FocusObject != null) { return; } if (!TsPlatform.IsEditor) { return; } NkBattleChar currentSelectChar = this.m_Battle.CastedTarget.GetCurrentSelectChar(); if (currentSelectChar != null && NkInputManager.GetKeyUp(KeyCode.Alpha1)) { int battleSkillUnique = currentSelectChar.GetSoldierInfo().SelectBattleSkillByWeapon(1); if (this.m_Battle.CastedTarget.CanSelecActionBattleSkill(battleSkillUnique)) { this.m_Battle.CastedTarget.m_iBattleSkillIndex = 1; this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_SKILL; this.m_Battle.CastedTarget.ShowBattleSkillRange(true, battleSkillUnique); } } if (NkInputManager.GetKeyUp(KeyCode.R) && this.m_Battle.CastedTarget.CurrentTurnAlly == this.m_Battle.CastedTarget.MyAlly) { this.m_Battle.CastedTarget.REQUEST_ORDER = eBATTLE_ORDER.eBATTLE_ORDER_CHANGEPOS; Main_UI_SystemMessage.ADDMessage(NrTSingleton <NrTextMgr> .Instance.GetTextFromNotify("364"), SYSTEM_MESSAGE_TYPE.IMPORTANT_MESSAGE); } if (NkInputManager.GetKeyUp(KeyCode.Tab) && this.m_Battle.CastedTarget.CurrentTurnAlly == this.m_Battle.CastedTarget.MyAlly) { this.m_Battle.CastedTarget.SelectNextChar(); } if (NkInputManager.GetKeyUp(KeyCode.Z)) { this.m_Battle.CastedTarget.Send_GS_BF_HOPE_TO_ENDTURN_REQ(); } if (NkInputManager.GetKeyUp(KeyCode.X)) { Battle_Control_Dlg battle_Control_Dlg = NrTSingleton <FormsManager> .Instance.GetForm(G_ID.BATTLE_CONTROL_DLG) as Battle_Control_Dlg; if (battle_Control_Dlg == null) { return; } battle_Control_Dlg.RequestRetreat(); } if (NkInputManager.GetKeyUp(KeyCode.V) && TsPlatform.IsEditor) { this.m_Battle.CastedTarget.ChangeBattleAuto(); } if (NkInputManager.GetKeyUp(KeyCode.C)) { } if (!NkInputManager.GetKey(KeyCode.LeftShift) || NkInputManager.GetKeyUp(KeyCode.M)) { } if (!NkInputManager.GetKey(KeyCode.LeftShift) || NkInputManager.GetKeyUp(KeyCode.N)) { } }