rsi/field.lua

14 lines
264 B
Lua
Raw Permalink Normal View History

2023-08-27 12:32:38 +00:00
field=object:extend()
function field:new(width,height)
self.width=width
self.height=height
self.contents={}
end -- new
function field:update(dt)
for k,v in pairs(self.contents) do
v:update(dt)
2023-08-27 23:00:22 +00:00
if v.destroy then game.field.contents[k]=nil end
2023-08-27 12:32:38 +00:00
end -- for field
end