Class WorldTextProcessor
Keeps track of every WorldTextComponent in the scene for the world text renderer.
public class WorldTextProcessor : EntityProcessor<WorldTextComponent, WorldTextRenderData>
- Inheritance
-
WorldTextProcessor
- Inherited Members
Remarks
Registered automatically through the DefaultEntityComponentProcessor attribute on the
component, so nothing needs to add it. Collection through a processor covers the whole entity
hierarchy and gives each component's cached measurement a lifetime tied to the component itself.
It also makes sure a WorldTextRenderer is on the scene's compositor, which is what
draws the components in Game Studio's scene editor and in a game that never called
AddWorldTextRenderer.
Properties
Texts
Gets every world text currently in the scene, in no particular order.
public IReadOnlyList<WorldTextRenderData> Texts { get; }
Property Value
Methods
Draw(RenderContext)
public override void Draw(RenderContext context)
Parameters
contextRenderContext
GenerateComponentData(Entity, WorldTextComponent)
protected override WorldTextRenderData GenerateComponentData(Entity entity, WorldTextComponent component)
Parameters
entityEntitycomponentWorldTextComponent
Returns
IsAssociatedDataValid(Entity, WorldTextComponent, WorldTextRenderData)
protected override bool IsAssociatedDataValid(Entity entity, WorldTextComponent component, WorldTextRenderData associatedData)
Parameters
entityEntitycomponentWorldTextComponentassociatedDataWorldTextRenderData
Returns
OnEntityComponentAdding(Entity, WorldTextComponent, WorldTextRenderData)
protected override void OnEntityComponentAdding(Entity entity, WorldTextComponent component, WorldTextRenderData data)
Parameters
entityEntitycomponentWorldTextComponentdataWorldTextRenderData
OnEntityComponentRemoved(Entity, WorldTextComponent, WorldTextRenderData)
protected override void OnEntityComponentRemoved(Entity entity, WorldTextComponent component, WorldTextRenderData data)
Parameters
entityEntitycomponentWorldTextComponentdataWorldTextRenderData