mirror of
https://gitlab.com/MaddoScientisto/cirnofarm.git
synced 2026-06-11 05:45:54 +00:00
27 lines
No EOL
352 B
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 |