public void ProcessInput(UserInterfaceManger ui, GameTimer timer) { _mouseGuru.Refresh(_inputAdapter); _keyboardGuru.Refersh(_inputAdapter); ui.ProcessInput(_mouseGuru, _keyboardGuru); HandleCameraMovement(_keyboardGuru); HandleSpeedInput(timer, _keyboardGuru); HandleCommandInput(ui.Selector); }
public GameManager(RenderAdapter renderAdapter, IUtilsAdapter utilsAdapter, IInputAdapter inputAdapter, IResourceAdapter resoruceAdapter) { _graphics = new GraphicsManager(renderAdapter); Utils.SetAdapter(utilsAdapter); _input = new InputManger(inputAdapter); ResoruceManger.SetAdapter(resoruceAdapter); SetUpGameWindow(); LoadFonts(); _world = new World(_factory, _settings.BackgroundMusicFileName); _ui = new UserInterfaceManger(_factory, _world); Statistics.SetWorld(_world); // Must be called After adapters are set _collsion = new CollsionManger(); _sound = new SoundManger(); }