boxes n walls n movement etcgit status

This commit is contained in:
0x81c 2015-03-12 03:04:09 -04:00
parent 9763040c99
commit 2772ec2563
10 changed files with 318 additions and 45 deletions

View file

@ -1,11 +1,27 @@
local input = {}
Input = {}
function input:handler()
Input.playermovekeys = { up = "up", down = "down", left = "left", right = "right" }
Input.playerswitchkeys = { ["1"] = "1", ["2"] = "2", ["3"] = "3" }
Input.colorfromkey = {"red", "green", "blue"}
function Input:handler()
end
function input:moveIsPressed()
function Input.isPlayerMove(key)
if Input.playermovekeys[key] then
return true
end
return false
end
return input
function Input.isPlayerSwitch(key)
if Input.playerswitchkeys[key] then
return true
end
return false
end
function Input.playerColor(key)
return Input.colorfromkey[tonumber(key)]
end