So, after some digging on this infamous medium better know as "A series of tubes" I found the following structure to emulate classes in Lua.
1 2 3 4 5 6 7 8 9 10 | Enemy = {} mt = {} mt.__index = Enemy function Enemy:new() local bug = display.newImage("bug.png") bug:rotate(90) return setmetatable(bug, mt) end |