Exemple #1
0
        public JoystickController(int index)
        {
            IsValid = asd.Engine.JoystickContainer.GetIsPresentAt(index);

            joystick = asd.Engine.JoystickContainer.GetJoystickAt(index);

            binding         = new Dictionary <TControl, IJoystickInput>();
            axisTiltBinding = new Dictionary <TTiltControl, int>();
        }
Exemple #2
0
 public asd.ButtonState GetState(asd.Joystick joystick)
 {
     if (currentState)
     {
         return(previousState
             ? asd.ButtonState.Hold
             : asd.ButtonState.Push);
     }
     else
     {
         return(previousState
             ? asd.ButtonState.Release
             : asd.ButtonState.Free);
     }
 }
Exemple #3
0
 public void Update(asd.Joystick joystick)
 {
     previousState = currentState;
     currentState  = joystick.GetAxisState(axisIndex) == direction;
 }
Exemple #4
0
 public void Update(asd.Joystick joystick)
 {
 }
Exemple #5
0
 public asd.ButtonState GetState(asd.Joystick joystick)
 {
     return(joystick.GetButtonState(index));
 }