Created
April 3, 2018 15:02
-
-
Save randomguyeatspotato/65bf22714eae439223983d3d4aa49111 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local enabledFunctions = require("gamestates/enabledFunctions") | |
local function emptyFunction() end | |
local function index(t, key) return getmetatable(t)[key] end | |
local function indexMeta(t, k) return enabledFunctions[key] and emptyFunction end | |
local function call(self) return setmetatable({}, self) end | |
local GameState = setmetatable({__index = index}, {__index = indexMeta, __call = call}) | |
return GameState |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment