Package com.mygdx.game.Components
Class Text
java.lang.Object
com.mygdx.game.Components.Component
com.mygdx.game.Components.Text
public class Text extends Component
Renders text with give font and colour.
Uses transform component for position but if not present then internal position is the bottom left
mainly used for debug
doen't fully work but is usable
-
Field Summary
Fields inherited from class com.mygdx.game.Components.Component
parent, reqsMet, requirements, type -
Constructor Summary
-
Method Summary
Modifier and Type Method Description voidcleanUp()Called once after the update loop has finished.voidrender()Called once per frame used exclusively for renderingvoidsetFontColour(com.badlogic.gdx.math.Vector3 col)voidsetPosition(float x, float y)isn't used if parent has a transform componentvoidsetPosition(com.badlogic.gdx.math.Vector2 pos)isn't used if parent has a transform componentvoidsetText(java.lang.String text)voidupdate()Called once per frameMethods inherited from class com.mygdx.game.Components.Component
awake, getParent, getType, setParent, setRequirements, startMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
Text
public Text() -
Text
public Text(com.badlogic.gdx.math.Vector3 fontColour)
-
-
Method Details
-
setPosition
public void setPosition(com.badlogic.gdx.math.Vector2 pos)isn't used if parent has a transform component- Parameters:
pos- pos to render the text
-
setPosition
public void setPosition(float x, float y)isn't used if parent has a transform component -
setFontColour
public void setFontColour(com.badlogic.gdx.math.Vector3 col) -
setText
public void setText(java.lang.String text) -
update
public void update()Description copied from class:ComponentCalled once per frame -
render
public void render()Description copied from class:ComponentCalled once per frame used exclusively for rendering -
cleanUp
public void cleanUp()Description copied from class:ComponentCalled once after the update loop has finished.
-