public class TypingTextAnimation extends BaseTextAnimation
TextAnimation that reveals the text as if it were being typed| Constructor and Description |
|---|
TypingTextAnimation()
Constructor.
|
TypingTextAnimation(float charactersPerSecond)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
float |
getCharactersPerSecond() |
void |
interpolate(java.lang.String text,
float alpha)
Interpolate the animation
|
void |
render(java.lang.String text,
Graphics g,
float x,
float y,
float width,
int hAlign)
Renders the animation
|
void |
skip()
Sets the
TextAnimation to be skipped |
void |
update(java.lang.String text,
float delta)
Update the animation
|
addTextAnimationListener, isFinished, removeTextAnimationListener, setFinishedpublic TypingTextAnimation()
public TypingTextAnimation(float charactersPerSecond)
charactersPerSecond - The amount of characters to reveal per secondpublic void update(java.lang.String text,
float delta)
TextAnimationtext - The target text to displaydelta - The time since the last frame (in seconds)public void interpolate(java.lang.String text,
float alpha)
TextAnimationtext - The target text to displayalpha - The interpolation alpha valuepublic void render(java.lang.String text,
Graphics g,
float x,
float y,
float width,
int hAlign)
TextAnimationtext - The target text to displayg - The Graphics contextx - The render X coordinatey - The render Y coordinatewidth - The text render widthhAlign - The horizontal alignment of the textpublic void skip()
TextAnimationTextAnimation to be skippedpublic float getCharactersPerSecond()