Ejemplo n.º 1
0
 private void Update()
 {
     //use new input system for console toggle (fixes some keyboard layouts)
     if (Keyboard.current.backquoteKey.wasPressedThisFrame)
     {
         CommandManager.RunCommand("toggleconsole", null);
         return;
     }
     if (Keyboard.current.escapeKey.wasPressedThisFrame)
     {
         CommandManager.RunCommand("togglemenu", null);
         return;
     }
     InputContainer.ResetKeypressState();
     RunBinds(Cvar.Boolean("console_open") || Globals.menuopen.Boolean);
 }