-- $LastChangedDate: 2008-10-13 23:50:44 -0400 (Mon, 13 Oct 2008) $
-- Events.
-- See module.txt for Lua pitfalls.

------------------
-- Events class --
------------------

Events = {
	resetCallbacks = {},
}

-- (private subroutine)
function Events:Broadcast( callbackTable )
	for k,callback in pairs(callbackTable) do
		callback()
	end
end

-----------------
-- reset event --
-----------------

function Events:RegisterReset( callback )
	table.insert( self.resetCallbacks, callback )
end

function Events:BroadcastReset()
	self:Broadcast( self.resetCallbacks )
end
