public void Update() { if (NkInputManager.GetKeyDown(KeyCode.LeftControl)) { this.m_bDownCtrl = true; } if (NkInputManager.GetKeyUp(KeyCode.LeftControl)) { this.m_bDownCtrl = false; } if (this.m_bDownCtrl && NkInputManager.GetKeyUp(KeyCode.LeftAlt)) { this.m_bActive = !this.m_bActive; if (this.m_bActive) { NrTSingleton <FormsManager> .Instance.HideAll(); } else { NrTSingleton <FormsManager> .Instance.ShowAll(); } } if (!this.m_bActive) { return; } if (NkInputManager.GetKeyDown(KeyCode.UpArrow)) { this.m_si16CommandLine -= 1; if (this.m_si16CommandLine <= 0) { this.m_si16CommandLine = 0; } this.m_buff = this.m_arCommand[(int)this.m_si16CommandLine]; } if (NkInputManager.GetKeyDown(KeyCode.DownArrow)) { this.m_si16CommandLine += 1; if ((int)this.m_si16CommandLine >= this.m_arCommand.Count) { this.m_si16CommandLine = (short)this.m_arCommand.Count; this.m_buff = string.Empty; } else { this.m_buff = this.m_arCommand[(int)this.m_si16CommandLine]; } } if (NkInputManager.GetKeyDown(KeyCode.Return) || NkInputManager.GetKeyDown(KeyCode.A)) { this.m_kCommandInterpreter.ParseCommand(this.m_buff); this.m_arCommand.Add(this.m_buff.Trim()); this.m_si16CommandLine = (short)this.m_arCommand.Count; this.m_buff = string.Empty; } }
private bool CheckNumberString() { if (!this.numberMode) { return(true); } if (NkInputManager.GetKeyDown(KeyCode.Delete) || NkInputManager.GetKeyDown(KeyCode.Backspace)) { return(true); } for (int i = 0; i < 10; i++) { if (NkInputManager.GetKeyDown(KeyCode.Alpha0 + i) || NkInputManager.GetKeyDown(KeyCode.Keypad0 + i)) { return(true); } } return(false); }
private void MyCharMoveKeyboard() { if (NkInputManager.GetKeyDown(KeyCode.W) || NkInputManager.GetKeyDown(KeyCode.UpArrow)) { this.CurCharKeyMoveStatus = (sbyte)((uint)this.CurCharKeyMoveStatus | 1u); } else if (NkInputManager.GetKeyUp(KeyCode.W) || NkInputManager.GetKeyUp(KeyCode.UpArrow)) { this.CurCharKeyMoveStatus = (sbyte)((int)this.CurCharKeyMoveStatus & -2); } if (NkInputManager.GetKeyDown(KeyCode.S) || NkInputManager.GetKeyDown(KeyCode.DownArrow)) { this.CurCharKeyMoveStatus = (sbyte)((uint)this.CurCharKeyMoveStatus | 2u); } else if (NkInputManager.GetKeyUp(KeyCode.S) || NkInputManager.GetKeyUp(KeyCode.DownArrow)) { this.CurCharKeyMoveStatus = (sbyte)((int)this.CurCharKeyMoveStatus & -3); } if (NkInputManager.GetKeyDown(KeyCode.A) || NkInputManager.GetKeyDown(KeyCode.LeftArrow)) { this.CurCharKeyMoveStatus = (sbyte)((uint)this.CurCharKeyMoveStatus | 4u); } else if (NkInputManager.GetKeyUp(KeyCode.A) || NkInputManager.GetKeyUp(KeyCode.LeftArrow)) { this.CurCharKeyMoveStatus = (sbyte)((int)this.CurCharKeyMoveStatus & -5); } if (NkInputManager.GetKeyDown(KeyCode.D) || NkInputManager.GetKeyDown(KeyCode.RightArrow)) { this.CurCharKeyMoveStatus = (sbyte)((uint)this.CurCharKeyMoveStatus | 8u); } else if (NkInputManager.GetKeyUp(KeyCode.D) || NkInputManager.GetKeyUp(KeyCode.RightArrow)) { this.CurCharKeyMoveStatus = (sbyte)((int)this.CurCharKeyMoveStatus & -9); } this.CharKeyBoardMove(); }
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 Other() { if (NkInputManager.GetKeyUp(KeyCode.F9)) { } if (NkInputManager.GetKeyUp(KeyCode.F10)) { NrTSingleton <FormsManager> .Instance.LoadForm(G_ID.NEWEXPLORATION_MAIN_DLG); } if (NkInputManager.GetKeyUp(KeyCode.Z) && NkInputManager.GetKey(KeyCode.LeftShift)) { GameObject gameObject = GameObject.Find("back light"); if (gameObject != null) { gameObject.SetActive(false); } } if (NkInputManager.GetKeyUp(KeyCode.Q) && NkInputManager.GetKey(KeyCode.LeftShift)) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.QUEST_GM_DLG); } if (NkInputManager.GetKeyUp(KeyCode.C) && NkInputManager.GetKey(KeyCode.LeftShift)) { Screen.fullScreen = !Screen.fullScreen; } if (NkInputManager.GetKeyUp(KeyCode.C) && NkInputManager.GetKey(KeyCode.RightShift)) { NkWorldMapATB worldMapATB = NrTSingleton <MapManager> .Instance.GetWorldMapATB(); if (worldMapATB != null) { worldMapATB.ShowCellGrid(); } } if (NkInputManager.GetKeyUp(KeyCode.U) && NkInputManager.GetKey(KeyCode.RightShift)) { GUICamera.ShowUI_Toggle(); } if (NkInputManager.GetKeyUp(KeyCode.D) && NkInputManager.GetKey(KeyCode.LeftShift)) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.MESSAGE_DLG)) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.MESSAGE_DLG); } else { NrTSingleton <FormsManager> .Instance.Hide(G_ID.MESSAGE_DLG); } } if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKey(KeyCode.LeftControl) && NkInputManager.GetKeyUp(KeyCode.D)) { NrTSingleton <MapManager> .Instance.ShowDestPosition(true); } if (NkInputManager.GetKey(KeyCode.LeftShift) && NkInputManager.GetKey(KeyCode.LeftAlt) && NkInputManager.GetKeyUp(KeyCode.D)) { NrTSingleton <MapManager> .Instance.ShowDestPosition(false); } if (NkInputManager.GetKeyDown(KeyCode.Alpha1) && NkInputManager.GetKey(KeyCode.LeftShift) && Scene.CurScene != Scene.Type.BATTLE) { NrTSingleton <NkCharManager> .Instance.ToggleShowCharUnique(); NrTSingleton <NkQuestManager> .Instance.ToggleQeustUnique(); } if (NkInputManager.GetKeyDown(KeyCode.P) && NkInputManager.GetKey(KeyCode.LeftShift)) { NrTSingleton <NrAutoPath> .Instance.ShowRPPoint(); } if (NkInputManager.GetKeyDown(KeyCode.P) && NkInputManager.GetKey(KeyCode.RightShift)) { NrTSingleton <NrAutoPath> .Instance.ClearRPPoint(); } if (!NkInputManager.GetKey(KeyCode.LeftAlt) || NkInputManager.GetKeyUp(KeyCode.K)) { } if (NkInputManager.GetKeyUp(KeyCode.S) && NkInputManager.GetKey(KeyCode.LeftShift)) { if (!NrTSingleton <FormsManager> .Instance.IsShow(G_ID.DLG_AUDIO)) { NrTSingleton <FormsManager> .Instance.ShowForm(G_ID.DLG_AUDIO); } else { NrTSingleton <FormsManager> .Instance.Hide(G_ID.DLG_AUDIO); } } if (!NkInputManager.GetKeyUp(KeyCode.Alpha2) || NkInputManager.GetKey(KeyCode.LeftShift)) { } if (NkInputManager.GetKeyUp(KeyCode.A) && NkInputManager.GetKey(KeyCode.LeftShift) && !Scene.IsCurScene(Scene.Type.SOLDIER_BATCH)) { SoldierBatch.SOLDIER_BATCH_MODE = eSOLDIER_BATCH_MODE.MODE_GUILDBOSS_MAKEUP; SoldierBatch.GUILDBOSS_INFO.m_i16Floor = 1; FacadeHandler.PushStage(Scene.Type.SOLDIER_BATCH); } }