Package com.shr4pnel.casino.builders
Class TypingAdapterBuilder
java.lang.Object
com.shr4pnel.casino.builders.TypingAdapterBuilder
Build TypingAdapters on the fly, which can play sounds when text has finished typing, or fire other events relating to a TypingLabel that has finished typing
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a TypingLabel event to firecom.rafaskoberg.gdx.typinglabel.TypingAdapterbuild()Build the typing adapter, with previously set parameterschainTypingLabel(com.rafaskoberg.gdx.typinglabel.TypingLabel tl, com.badlogic.gdx.scenes.scene2d.ui.Window w) Chain a typing label, start a typing label when another has finisheddelay(int delayMillis) Set a delay, before performing any set actions at the end of a typinglabelDo not interrupt other sound effects when the typing label has finishedSet a sound to play at the end of the TypingLabelSet a sound to play at the end of the TypingLabel
-
Constructor Details
-
TypingAdapterBuilder
public TypingAdapterBuilder()
-
-
Method Details
-
setSound
Set a sound to play at the end of the TypingLabel- Parameters:
path- Path to the audio file relative to assets/- Returns:
- The current instance
-
setSound
Set a sound to play at the end of the TypingLabel- Parameters:
path- Path to the audio file relative to assets/vol- The volume of the sound effect from 0-1- Returns:
- The current instance
-
dontStopSound
Do not interrupt other sound effects when the typing label has finished- Returns:
- The current instance
-
chainTypingLabel
public TypingAdapterBuilder chainTypingLabel(com.rafaskoberg.gdx.typinglabel.TypingLabel tl, com.badlogic.gdx.scenes.scene2d.ui.Window w) Chain a typing label, start a typing label when another has finished- Parameters:
tl- The new typing labelw- The window to render the typing label inside- Returns:
- The current instance
-
delay
Set a delay, before performing any set actions at the end of a typinglabel- Parameters:
delayMillis- How long to wait in ms- Returns:
- The current instance
-
addEvent
Add a TypingLabel event to fire- Parameters:
s- The name of the event- Returns:
- The current instance
-
build
public com.rafaskoberg.gdx.typinglabel.TypingAdapter build()Build the typing adapter, with previously set parameters- Returns:
- A TypingAdapter
-