mirror of
https://github.com/unixtensor/Roblox-Elevator-Game.git
synced 2025-12-16 14:31:54 +00:00
New game file structure
Scratch making the framework/engine open source for now until i figure out a better file structure that will work with Rojo
This commit is contained in:
34
src/shared/Client/KeyBinds.lua
Normal file
34
src/shared/Client/KeyBinds.lua
Normal file
@@ -0,0 +1,34 @@
|
||||
local Binds = {}
|
||||
Binds.__index = Binds
|
||||
|
||||
local BindsMap = {
|
||||
Keys = {}
|
||||
}
|
||||
BindsMap.__index = BindsMap
|
||||
|
||||
local UIS = game:GetService("UserInputService")
|
||||
|
||||
function Binds.constructor() --Allow multiple bindings of the same keys, no overwrites
|
||||
return setmetatable({}, BindsMap)
|
||||
end
|
||||
|
||||
function BindsMap.new()
|
||||
local InputBegan = UIS.InputBegan:Connect(function(input, gameProcessedEvent)
|
||||
if not gameProcessedEvent then
|
||||
|
||||
end
|
||||
end)
|
||||
|
||||
local InputEnded = UIS.InputEnded:Connect(function(input, gameProcessedEvent)
|
||||
if not gameProcessedEvent then
|
||||
|
||||
end
|
||||
end)
|
||||
|
||||
return setmetatable({
|
||||
InputBegan = InputBegan,
|
||||
InputEnded = InputEnded
|
||||
}, BindsMap)
|
||||
end
|
||||
|
||||
return Binds
|
||||
Reference in New Issue
Block a user