public virtual void SetNewState() { newInputState = GetState(); }
public override InputState GetState() { newKeyState = Keyboard.GetState(); newMouseState = Mouse.GetState(); Stick LeftStick_WASD = new Stick(newKeyState.IsKeyDown(Keys.W), newKeyState.IsKeyDown(Keys.S), newKeyState.IsKeyDown(Keys.A), newKeyState.IsKeyDown(Keys.D)); Stick RightStick_Mouse = new Stick(GetRightStick(mouseStickRadius)); newInputState = new InputState(LeftStick_WASD, RightStick_Mouse, newMouseState.RightButton, newMouseState.LeftButton, newKeyState.IsKeyDown(Keys.D1), newKeyState.IsKeyDown(Keys.D2), newKeyState.IsKeyDown(Keys.D3), newKeyState.IsKeyDown(Keys.D4), newKeyState.IsKeyDown(Keys.Up), newKeyState.IsKeyDown(Keys.Down), newKeyState.IsKeyDown(Keys.Right), newKeyState.IsKeyDown(Keys.Left), newKeyState.IsKeyDown(Keys.Tab), newKeyState.IsKeyDown(Keys.Escape), newKeyState.IsKeyDown(Keys.Q), newKeyState.IsKeyDown(Keys.E)); return newInputState; }
public override InputState GetState() { newGamePadState = GamePad.GetState(playerIndex, GamePadDeadZone.Circular); newInputState = new InputState(ref newGamePadState, triggerDeadZone); return newInputState; }