|
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)
|
|
if v.destroy then game.field.contents[k]=nil end
|
|
end -- for field
|
|
end |