-- Update loop; on every loop, checks if an object should be made and, if so, creates that object

local last = tick()
while wait() do
    local now = tick()
    local delta = now - last

    for _, object in ipairs(fallingStuffTable) do
        if checkIfShouldDrop(object, delta) then
            local obj = object.MODEL:Clone()
            positionFallingObject(obj)
            setupFallingObjectCollisions(obj, object.DAMAGE)
            objectCleanup(obj, object.CLEANUP_DELAY_IN_SECONDS)
        end
    end

    last = now
end
