Is there any way I can store a call to a function in a table, and then call that function, like this:
local levels = { loadLevel1() } function M.load(levelNumber) --call something like levels[levelNumber] end function loadLevel1() --loads level 1 map and enemies end
How could I achieve something like this?