Package com.xebisco.yield
Class TextMesh
java.lang.Object
com.xebisco.yield.AbstractBehavior
com.xebisco.yield.ComponentBehavior
com.xebisco.yield.AbstractRenderable
com.xebisco.yield.TextMesh
- All Implemented Interfaces:
Behavior,Renderable,Closeable,AutoCloseable
TextMesh class extends AbstractRenderable and represents a text mesh object.
It is used to render text with specified contents, color, and font.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncolor()Returns the color of theTextMesh.contents()Returns the text contents of theTextMesh.voidonStart()Called when the entity starts.voidRenders the behavior.Sets the color of theTextMesh.setContents(String contents) Sets the text contents of theTextMesh.Methods inherited from class com.xebisco.yield.AbstractRenderable
form, paintMethods inherited from class com.xebisco.yield.ComponentBehavior
application, close, component, component, entity, onCreate, onLateUpdate, onUpdate, renderIndex, setEntity, setRenderIndex, texture, texture, transformMethods inherited from class com.xebisco.yield.AbstractBehavior
frames, tick
-
Constructor Details
-
TextMesh
public TextMesh()Constructs a new TextMesh.
-
-
Method Details
-
render
Description copied from class:ComponentBehaviorRenders the behavior.- Specified by:
renderin interfaceRenderable- Overrides:
renderin classAbstractRenderable- Parameters:
renderer- The renderer.
-
onStart
public void onStart()Description copied from class:ComponentBehaviorCalled when the entity starts.- Specified by:
onStartin interfaceBehavior- Overrides:
onStartin classComponentBehavior
-
contents
Returns the text contents of theTextMesh.- Returns:
- The text contents.
-
setContents
Sets the text contents of theTextMesh.- Parameters:
contents- The new text contents to be set.- Returns:
- The
TextMeshobject for method chaining.
-
color
Returns the color of theTextMesh.- Returns:
- The color of the text.
-
setColor
Sets the color of theTextMesh.- Parameters:
color- The new color to be set.- Returns:
- The
TextMeshobject for method chaining.
-