private void TreadLoop() { while (Thread.CurrentThread.IsAlive && Console.WindowHeight + Console.WindowWidth > 0) { if (!server.RunConsoleSession()) { Console.WriteLine("ESC is pressed"); EscPressed.Set(); break; } } Console.WriteLine("Exiting consoleLoop"); }
private void Update() { if (Input.GetKeyDown(KeyCode.I)) { _animator.Play("Back_Idle"); _playerAction.StartAction("Eaten"); } if (Input.GetKeyDown(KeyCode.Escape)) { EscPressed?.Invoke(); } if (Input.GetKeyDown(KeyCode.Space)) { CloseWelcomeWindow?.Invoke(); } }