protected override void Initialize() { _gameState = MyExampleState.Game; _world = new World01(); _world.Initialize(Window); _gui = new View(new FloatRect(0, 0, 500, 500)); _menu = new Menu(); _menu.Initialize(Window); }
protected override void KeyPressed(object sender, KeyEventArgs e) { if (e.Code == Keyboard.Key.Escape) { Window.Close(); } if (e.Code == Keyboard.Key.Enter) { _gameState = _gameState == MyExampleState.Game ? MyExampleState.Menu : MyExampleState.Game; } GetGameInput().KeyPressed(Window, sender, e); }