--M = {} Actor = { life=100, spriteIndex=0, } --actor.__index = actor function Actor:new(new_x,new_y) local o = { x=new_x, y=new_y, w=16, h=16 } return setmetatable(o, {__index=self}) end function Actor:update() end function Actor:draw() spr(self.spriteIndex,self.x,self.y) end --M.actor = actor return Actor