mirror of
https://gitlab.com/MaddoScientisto/cirnofarm.git
synced 2026-06-08 14:25:54 +00:00
24 lines
306 B
Lua
24 lines
306 B
Lua
|
|
--M = {}
|
||
|
|
|
||
|
|
actor = {}
|
||
|
|
actor.__index = actor
|
||
|
|
function actor:new(x,y)
|
||
|
|
local o = setmetatable({}, actor)
|
||
|
|
o.x=x
|
||
|
|
o.y=y
|
||
|
|
o.life=100
|
||
|
|
o.spriteIndex=0
|
||
|
|
return o
|
||
|
|
end
|
||
|
|
|
||
|
|
function actor:update()
|
||
|
|
|
||
|
|
end
|
||
|
|
|
||
|
|
function actor:draw()
|
||
|
|
spr(self.spriteIndex,self.x,self.y)
|
||
|
|
end
|
||
|
|
|
||
|
|
--M.actor = actor
|
||
|
|
|
||
|
|
return actor
|