we have a pretty simple shoot function that registers bullets to zombie which goes along the lines of:
[lua]
local function hitTestObjects(obj1, obj2)
return obj1.contentBounds.xMin < obj2.contentBounds.xMax
and obj1.contentBounds.xMax > obj2.contentBounds.xMin
and obj1.contentBounds.yMin < obj2.contentBounds.yMax
and obj1.contentBounds.yMax > obj2.contentBounds.yMin
end
[/lua]
this helps identify which collision is getting handled or who is in place.
we have a delete function that takes the relative object getting deleted from the returned object above to here:
[lua]
local toRemove={}
function killObject()
for i=1,#toRemove do
toRemove[i]:removeSelf()
toRemove[i] = nil
end
end
Runtime:addEventListener(“enterFrame”,killObject)
[/lua]
and just from testing this all out we notice memory does not clear. are we missing anything?