public interface TextAnimation
Modifier and Type | Method and Description |
---|---|
void |
addTextAnimationListener(TextAnimationListener listener)
Adds a
TextAnimationListener to this TextAnimation |
boolean |
isFinished()
Returns if the
TextAnimation has finished |
void |
onResize(GameFontCache cache,
java.lang.String text,
float renderWidth,
int hAlign)
Handles label resizing
|
void |
removeTextAnimationListener(TextAnimationListener listener)
Removes a
TextAnimationListener from this TextAnimation |
void |
render(GameFontCache cache,
Graphics g,
int renderX,
int renderY)
Renders the animation
|
void |
reset()
Resets the animation
|
void |
skip()
Sets the
TextAnimation to be skipped |
void |
update(GameFontCache cache,
java.lang.String text,
float renderWidth,
int hAlign,
float delta)
Update the animation
|
void update(GameFontCache cache, java.lang.String text, float renderWidth, int hAlign, float delta)
cache
- The GameFontCache
to use to render the texttext
- The target text to displayrenderWidth
- The text render widthhAlign
- The horizontal alignment of the textdelta
- The time since the last frame (in seconds)void render(GameFontCache cache, Graphics g, int renderX, int renderY)
cache
- The GameFontCache
to use to render the textg
- The Graphics
contextrenderX
- The render X coordinaterenderY
- The render Y coordinatevoid skip()
TextAnimation
to be skippedboolean isFinished()
TextAnimation
has finishedvoid reset()
void onResize(GameFontCache cache, java.lang.String text, float renderWidth, int hAlign)
void addTextAnimationListener(TextAnimationListener listener)
TextAnimationListener
to this TextAnimation
listener
- The TextAnimationListener
to be addedvoid removeTextAnimationListener(TextAnimationListener listener)
TextAnimationListener
from this TextAnimation
listener
- The TextAnimationListener
to be removed