Property definitions

scene2d $ LiveGroup :: defaultinit
# Organizational class to manage groups of sprites and other live objects.
class LiveGroup[E: LiveObject]
	super LiveObject
	super List[E]

	# Recursively update each live objects that `exists'
	redef fun update
	do
		for x in self do if x.exists then x.update
	end

	# Remove all live Objects that do not exists
	# Call this to cleanup the live group
	fun gc
	do
		var i = self.iterator
		while i.is_ok do
			var e = i.item
			if not e.exists then
				i.delete
			else if e isa LiveGroup[LiveObject] then
				e.gc
			end
			i.next
		end
	end

	# Recursively draw each live objects that `exists'
	redef fun draw(view)
	do
		for x in self do if x.exists then x.draw(view)
	end
end
lib/scene2d/scene2d.nit:107,1--139,3