diff --git a/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/UserInput.Gamepad.modulescript.lua b/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/UserInput.Gamepad.modulescript.lua index d829fe5..962b1ad 100644 --- a/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/UserInput.Gamepad.modulescript.lua +++ b/src/StarterPlayer/StarterPlayerScripts/Aero/Controllers/UserInput.Gamepad.modulescript.lua @@ -6,6 +6,7 @@ gamepad = Gamepad.new(gamepadUserInputType) + Boolean gamepad:IsDown(key) Boolean gamepad:IsConnected() InputObject gamepad:GetState(keyCode) Void gamepad:SetMotor(motor, value) @@ -121,6 +122,11 @@ function Gamepad:DisconnectAll() end +function Gamepad:IsDown(key) + return userInput:IsGamepadButtonDown(self._gamepadInput, key) +end + + function Gamepad:IsConnected() return self._isConnected end @@ -173,4 +179,4 @@ function Gamepad:Init() end -return Gamepad \ No newline at end of file +return Gamepad