Composes a scene out of named SceneComponents instead of one class accreting every
responsibility a scene ends up needing - a factory assembling named sections (map,
encounters, UI) at scene-creation time, each a separate module with its own lifecycle.
A composition helper, not a base class: a scene owns one SceneComponentHost and forwards
core.Scene's lifecycle methods to it, the same few lines regardless of whether that scene
extends core.Scene directly or two-d.Scene2D - inheritance would have to pick one of
those to sit above, composition does not.
Composes a scene out of named
SceneComponents instead of one class accreting every responsibility a scene ends up needing - a factory assembling named sections (map, encounters, UI) at scene-creation time, each a separate module with its own lifecycle.A composition helper, not a base class: a scene owns one
SceneComponentHostand forwardscore.Scene's lifecycle methods to it, the same few lines regardless of whether that scene extendscore.Scenedirectly ortwo-d.Scene2D- inheritance would have to pick one of those to sit above, composition does not.Example