Finished manual gearbox

This commit is contained in:
Ivan Grachyov
2021-11-11 22:16:33 +05:00
parent f55c30c4d3
commit d73f424d7f
15 changed files with 588 additions and 62 deletions

View File

@@ -27,8 +27,8 @@ function Input:noKeysHolding(axle)
end
function Input:getAxleValue(axle)
local positiveValue = axle.Positive ~= nil and input.isKeyDown(axle.Positive)
local negativeValue = axle.Negative ~= nil and input.isKeyDown(axle.Negative)
local positiveValue = axle.Positive ~= nil and (input.isKeyDown(axle.Positive) or input.isMouseDown(axle.Positive))
local negativeValue = axle.Negative ~= nil and (input.isKeyDown(axle.Negative) or input.isMouseDown(axle.Negative))
return (positiveValue and 1 or 0) - (negativeValue and 1 or 0) -- (input.isKeyDown(axle.Positive) and 1 or 0) - (input.isKeyDown(axle.Negative) and 1 or 0)
end