GameComponentManager - adamveld12/Xenon.Core GitHub Wiki

GameComponentManager

Manages GameComponents life. Updates, Renders and disposes of each GameComponent at the appropriate times.

This differs from XNA/Mono game's GameComponent and GameComponentCollection classes in a few key ways. For one, the GameComponent doesn't take any dependencies and the GameComponentManager does not rely on clunky ordering ints to maintain update/render order. The order in which you append/prepend your components will determine the order in which they're updated/drawn.

Append(GameComponent component) - Appends a GameComponent to the manager
Prepend(GameComponent component) - Prepends a GameComponent to the manager, adding it to the front of the list
Update() - Updates all of the underlying GameComponent instances currently managed
Render() - Renders all of the underlying GameComponent instances currently managed
Dispose() - Disposes of all the underlying GameComponent instances currently managed