void Update() { if (RestartListener.Instance.isTransitioning) { return; } PlayerInput input = _playerInput.GetInput(); _state.Update(input); }
public static int GameMenu(IPlayerInput pinput) { Console.WriteLine("1: New PvP game | 2: New PvE game | 3: Exit"); ConsoleKey k = pinput.GetInput(); switch (k) { case ConsoleKey.D1: try { Console.Clear(); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(1); case ConsoleKey.D2: try { Console.Clear(); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(2); case ConsoleKey.D3: try { Console.Clear(); } catch (Exception ex) { Console.WriteLine(ex.Message); } return(3); default: return(3); } }