Bandidos
|
Public Member Functions | |
TextEntity (boolean isUI) | |
TextEntity (String text, boolean isUI) | |
TextEntity (FontData fontData, boolean isUI) | |
TextEntity (FontData fontData, String text, boolean isUI) | |
void | setFont (FontData fontData) |
void | setText (String text) |
void | setFontSize (float size) |
RenderComponent | getRenderComponent () |
Vector2 | getTextBounds () |
Public Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity | |
BaseEntity () | |
TransformComponent | getTransformComponent () |
boolean | hasInstanceOfComponent (BaseEntityComponent componentInstance) |
void | addTag (String tag) |
void | removeTag (String tag) |
boolean | hasTag (String tag) |
void | update (float dt) |
void | render (RenderComponents renderComponents) |
void | destroy () |
boolean | isDestroyed () |
Public Member Functions inherited from com.mygdx.game.engine.events.EventDispatcher | |
void | addEventListener (String type, IEventReceiver listeningClass) |
void | dispatchEvent (Event event) |
void | removeEventListener (String type, IEventReceiver listener) |
boolean | hasEventListener (String type) |
ArrayList< ListenerItem > | getAllListeners () |
void | destroyAllListeners () |
void | clean () |
Protected Member Functions | |
void | awake () |
void | updated (float dt) |
void | rendered (RenderComponents renderComponents) |
void | destroyed () |
Protected Member Functions inherited from com.mygdx.game.engine.entities.BaseEntity | |
abstract void | awake () |
abstract void | updated (float dt) |
abstract void | rendered (RenderComponents renderComponents) |
abstract void | destroyed () |
This class is an entity which renders Text on the screen.
com.mygdx.game.engine.entities.TextEntity.TextEntity | ( | boolean | isUI | ) |
Creates an empty text with the default font.
isUI | indicates if this entity should be rendered on the HudCam. If true it will be rendered on the HudCam else on the MainCam |
com.mygdx.game.engine.entities.TextEntity.TextEntity | ( | String | text, |
boolean | isUI | ||
) |
Creates a text entity with the given text and default font
text | to give the text |
isUI | indicates if this entity should be rendered on the HudCam. If true it will be rendered on the HudCam else on the MainCam |
com.mygdx.game.engine.entities.TextEntity.TextEntity | ( | FontData | fontData, |
boolean | isUI | ||
) |
Creates an empty text with the given font.
fontData | of the font to give this textEntity |
isUI | indicates if this entity should be rendered on the HudCam. If true it will be rendered on the HudCam else on the MainCam |
com.mygdx.game.engine.entities.TextEntity.TextEntity | ( | FontData | fontData, |
String | text, | ||
boolean | isUI | ||
) |
Creates a text entity with the given text and the given font
fontData | of the font to give this textEntity |
text | to give the text |
isUI | indicates if this entity should be rendered on the HudCam. If true it will be rendered on the HudCam else on the MainCam |
|
protected |
|
protected |
RenderComponent com.mygdx.game.engine.entities.TextEntity.getRenderComponent | ( | ) |
Returns the RenderComponent for the TextEntity WARNING: Do not remove the RenderComponent
Vector2 com.mygdx.game.engine.entities.TextEntity.getTextBounds | ( | ) |
|
protected |
void com.mygdx.game.engine.entities.TextEntity.setFont | ( | FontData | fontData | ) |
Sets the font for this TextEntity
fontData | of the font to give this textEntity |
void com.mygdx.game.engine.entities.TextEntity.setFontSize | ( | float | size | ) |
Sets the fontsize for this TextEntity. (Default: 12)
size | for font to display as. |
void com.mygdx.game.engine.entities.TextEntity.setText | ( | String | text | ) |
Sets the text for this TextEntity
text | to display |
|
protected |