cirnofarm/src/actor2.lua

27 lines
No EOL
352 B
Lua

--M = {}
Actor = {
life=100,
spriteIndex=0,
}
--actor.__index = actor
function Actor:new(new_x,new_y)
local o = {
x=new_x,
y=new_y,
}
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