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
-
-
Method Summary
All Methods Instance Methods Concrete Methods 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 frame
-
-
-
Method Detail
-
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
-
-