Exemplo n.º 1
0
 private void ExecuteButton(int index, ButtonState curState)
 {
     buttonsData.keyButtons[index].Execute(
         KeyboardButtonPresser.GetJoyState(
             curState == ButtonState.Pressed,
             buttonsData.keyButtons[index].lastState == ButtonState.Pressed),
         curState);
 }
Exemplo n.º 2
0
 private void ExecuteMouseMove(Vector2 value, bool canExecute)
 {
     mouseMoveData.keyButtons.Execute(KeyboardButtonPresser.GetJoyState(canExecute, lastCanExecute));
     if (canExecute)
     {
         SimulatorMethods.instance.MouseMoveBy(
             (int)(mouseMoveData.value * value.x * Time.deltaTime),
             (int)(mouseMoveData.value * value.y * -Time.deltaTime)
             );
     }
 }
Exemplo n.º 3
0
 private void ExecuteMouseCircleMove(Vector2 value, bool canExecute)
 {
     mouseCircleMoveData.keyButtons.Execute(KeyboardButtonPresser.GetJoyState(canExecute, lastCanExecute));
     if (canExecute)
     {
         SimulatorMethods.instance.MouseSetPos(
             (int)(mouseCircleMoveData.centerX + value.x * mouseCircleMoveData.value),
             (int)(mouseCircleMoveData.centerY + value.y * -mouseCircleMoveData.value)
             );
     }
 }
Exemplo n.º 4
0
 private JoyButtonState GetState()
 {
     currentState = GetValue();
     return(KeyboardButtonPresser.GetJoyState(currentState == ButtonState.Pressed, lastState == ButtonState.Pressed));
 }