Wildcard import

This commit is contained in:
Antoine 2021-06-01 19:51:01 +02:00
parent 094fedc3a2
commit 51733a2e6a

View File

@ -5,6 +5,7 @@ import java.nio.FloatBuffer;
import engine.Engine; import engine.Engine;
import static engine.input.inputVariables.*;
import static org.lwjgl.glfw.GLFW.*; import static org.lwjgl.glfw.GLFW.*;
/* Buttons /* Buttons
0 : Croix / A 0 : Croix / A
@ -106,50 +107,50 @@ public class GamepadInput {
// A B X Y // A B X Y
buttonA_pressed = gamepadButton.get(inputVariables.buttonA) == 1; buttonA_pressed = gamepadButton.get(buttonA) == 1;
buttonB_pressed = gamepadButton.get(inputVariables.buttonB) == 1; buttonB_pressed = gamepadButton.get(buttonB) == 1;
buttonY_pressed = gamepadButton.get(inputVariables.buttonY) == 1; buttonY_pressed = gamepadButton.get(buttonY) == 1;
buttonX_pressed = gamepadButton.get(inputVariables.buttonX) == 1; buttonX_pressed = gamepadButton.get(buttonX) == 1;
// LB RB // LB RB
LB_pressed = gamepadButton.get(inputVariables.LB) == 1; LB_pressed = gamepadButton.get(LB) == 1;
RB_pressed = gamepadButton.get(inputVariables.RB) == 1; RB_pressed = gamepadButton.get(RB) == 1;
//start select //start select
start_pressed = gamepadButton.get(inputVariables.start) == 1; start_pressed = gamepadButton.get(start) == 1;
select_pressed = gamepadButton.get(inputVariables.select) == 1; select_pressed = gamepadButton.get(select) == 1;
//R & L JoystickClick //R & L JoystickClick
R_JoyClick_pressed = gamepadButton.get(inputVariables.R_JoystickClick) == 1; R_JoyClick_pressed = gamepadButton.get(R_JoystickClick) == 1;
L_JoyClick_pressed = gamepadButton.get(inputVariables.L_JoystickClick) == 1; L_JoyClick_pressed = gamepadButton.get(L_JoystickClick) == 1;
//up, down, left, right //up, down, left, right
up_pressed = gamepadButton.get(inputVariables.up) == 1; up_pressed = gamepadButton.get(up) == 1;
down_pressed = gamepadButton.get(inputVariables.down) == 1; down_pressed = gamepadButton.get(down) == 1;
left_pressed = gamepadButton.get(inputVariables.left) == 1; left_pressed = gamepadButton.get(left) == 1;
right_pressed = gamepadButton.get(inputVariables.right) == 1; right_pressed = gamepadButton.get(right) == 1;
//Left Joystick //Left Joystick
leftJoyRight = gamepadAxes.get(inputVariables.leftJoyX_Axe) > 0.1; leftJoyRight = gamepadAxes.get(leftJoyX_Axe) > 0.1;
leftJoyLeft = gamepadAxes.get(inputVariables.leftJoyX_Axe) < -0.1; leftJoyLeft = gamepadAxes.get(leftJoyX_Axe) < -0.1;
leftJoyDown = gamepadAxes.get(inputVariables.leftJoyY_Axe) > 0.1; leftJoyDown = gamepadAxes.get(leftJoyY_Axe) > 0.1;
leftJoyUp = gamepadAxes.get(inputVariables.leftJoyY_Axe) < -0.1; leftJoyUp = gamepadAxes.get(leftJoyY_Axe) < -0.1;
//Right Joystick //Right Joystick
rightJoyRight = gamepadAxes.get(inputVariables.rightJoyX_Axe) > 0.1; rightJoyRight = gamepadAxes.get(rightJoyX_Axe) > 0.1;
rightJoyLeft = gamepadAxes.get(inputVariables.rightJoyX_Axe) < -0.1; rightJoyLeft = gamepadAxes.get(rightJoyX_Axe) < -0.1;
rightJoyDown = gamepadAxes.get(inputVariables.rightJoyY_Axe) > 0.1; rightJoyDown = gamepadAxes.get(rightJoyY_Axe) > 0.1;
rightJoyUp = gamepadAxes.get(inputVariables.rightJoyY_Axe) < -0.1; rightJoyUp = gamepadAxes.get(rightJoyY_Axe) < -0.1;
//LT RT //LT RT
LT_pressed = gamepadButton.get(inputVariables.LT) == 1; LT_pressed = gamepadButton.get(LT) == 1;
RT_pressed = gamepadButton.get(inputVariables.RT) == 1; RT_pressed = gamepadButton.get(RT) == 1;
} }
public boolean checkPressed(int keyCode){ public boolean checkPressed(int keyCode){