Files
rsi/field.lua

14 lines
264 B
Lua
Raw Permalink Normal View History

2023-08-27 14:32:38 +02: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-28 01:00:22 +02:00
if v.destroy then game.field.contents[k]=nil end
2023-08-27 14:32:38 +02:00
end -- for field
end