internal InputManagerBase(IServiceRegistry registry) : base(registry) { Enabled = true; gamePads = new GamePad[MaximumGamePadCount]; gamePadStates = new GamePadState[MaximumGamePadCount]; KeyDown = downKeysList; KeyEvents = new List <KeyEvent>(); PointerEvents = currentPointerEvents; GestureEvents = currentGestureEvents; ActivatedGestures = new GestureConfigCollection(); ActivatedGestures.CollectionChanged += ActivatedGesturesChanged; Services.AddService(typeof(InputManager), this); Accelerometer = new AccelerometerSensor(); Compass = new CompassSensor(); Gyroscope = new GyroscopeSensor(); UserAcceleration = new UserAccelerationSensor(); Gravity = new GravitySensor(); Orientation = new OrientationSensor(); Sensors.Add(Accelerometer); Sensors.Add(Compass); Sensors.Add(Gyroscope); Sensors.Add(UserAcceleration); Sensors.Add(Gravity); Sensors.Add(Orientation); }
internal InputManagerBase(IServiceRegistry registry) : base(registry) { Enabled = true; gamePads = new GamePad[MaximumGamePadCount]; gamePadStates = new GamePadState[MaximumGamePadCount]; KeyDown = downKeysList; KeyEvents = new List <KeyEvent>(); PointerEvents = currentPointerEvents; GestureEvents = currentGestureEvents; ActivatedGestures = new GestureConfigCollection(); ActivatedGestures.CollectionChanged += ActivatedGesturesChanged; Services.AddService(typeof(InputManager), this); Accelerometer = new AccelerometerSensor(); Compass = new CompassSensor(); Gyroscope = new GyroscopeSensor(); UserAcceleration = new UserAccelerationSensor(); Gravity = new GravitySensor(); Orientation = new OrientationSensor(); Sensors.Add(Accelerometer); Sensors.Add(Compass); Sensors.Add(Gyroscope); Sensors.Add(UserAcceleration); Sensors.Add(Gravity); Sensors.Add(Orientation); supportedGamePadButtons.Add(GamePadButton.A); supportedGamePadButtons.Add(GamePadButton.B); supportedGamePadButtons.Add(GamePadButton.X); supportedGamePadButtons.Add(GamePadButton.Y); supportedGamePadButtons.Add(GamePadButton.Start); supportedGamePadButtons.Add(GamePadButton.Back); supportedGamePadButtons.Add(GamePadButton.LeftShoulder); supportedGamePadButtons.Add(GamePadButton.RightShoulder); supportedGamePadButtons.Add(GamePadButton.RightThumb); supportedGamePadButtons.Add(GamePadButton.LeftThumb); supportedGamePadButtons.Add(GamePadButton.PadUp); supportedGamePadButtons.Add(GamePadButton.PadDown); supportedGamePadButtons.Add(GamePadButton.PadLeft); supportedGamePadButtons.Add(GamePadButton.PadRight); for (var i = 0; i < MaximumGamePadCount; i++) { pressedGamePadButtonsSet[i] = new HashSet <GamePadButton>(); releasedGamePadButtonsSet[i] = new HashSet <GamePadButton>(); currentGamePadButtonsSet[i] = new HashSet <GamePadButton>(); activeGamePadButtonsSet[i] = new HashSet <GamePadButton>(); } }
internal InputManagerBase(IServiceRegistry registry) : base(registry) { Enabled = true; gamePads = new GamePad[MaximumGamePadCount]; gamePadStates = new GamePadState[MaximumGamePadCount]; KeyDown = downKeysList; KeyEvents = new List <KeyEvent>(); PointerEvents = currentPointerEvents; GestureEvents = currentGestureEvents; ActivatedGestures = new GestureConfigCollection(); ActivatedGestures.CollectionChanged += ActivatedGesturesChanged; Services.AddService(typeof(InputManager), this); }