Scene Graph Verse Component
A Verse component is your logic attached to an entity — write a class that runs per-entity behavior (patrol, glow, react) and add it to any entity that needs it.
Want a torch that glows, an NPC that patrols, a platform that blinks? In Scene Graph, that behavior is a component — a little class you attach to an entity.
Think of the component as a blueprint. You write the behavior once, then stamp it onto any entity that needs it — each entity runs its own copy of the same logic.
We declare 'glow_component' from 'component' with final_super, so it can attach to entities. Inside OnBeginSimulation we use Entity — the entity this copy lives on — call GetComponent to grab its sound component, and Play it. Same class, different entity each time.
A component is your logic wearing an entity. Write it once, attach it anywhere.
glow_component := class<final_super>(component):
OnBeginSimulation<override>():void =
if (Light := Entity.GetComponent[sound_component]):
Light.Play()
Build your own lesson with scene_graph_verse_component
Generate a personalized, compile-checked lesson grounded in this exact reference.
Build a lesson →