public class HKTimeline
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<java.lang.String> |
chapterList
An ordered list of chapter IDs
|
java.util.HashMap<java.lang.String,HKChapter> |
chapters
A map of chapter IDs to Chapter objects.
|
HKChapter |
currentChapter
A map of chapter IDs to Chapter objects.
|
float |
currentTime
The current animation time
|
float |
duration
The current animation duration
|
Constructor and Description |
---|
HKTimeline() |
Modifier and Type | Method and Description |
---|---|
void |
moveToChapter(java.lang.String chapterID)
Jump to the current module's chapter with the given ID
|
void |
moveToTime(float time)
Jump to the given time in the current scene's current animation
|
void |
nextChapter()
Jump to the current module's next chapter
|
void |
pause()
Pause the current scene's animation
|
void |
play()
Play the current scene's animation
|
boolean |
playing()
Check if there is an animation playing
|
void |
prevChapter()
Jump to the current module's previous chapter
|
void |
unpause()
Unpause the current scene's animation
|
public HKChapter currentChapter
public java.util.HashMap<java.lang.String,HKChapter> chapters
public java.util.ArrayList<java.lang.String> chapterList
public float currentTime
public float duration
public void play()
public void pause()
public void unpause()
public void nextChapter()
public void prevChapter()
public void moveToChapter(java.lang.String chapterID)
chapterID
- ID of the chapterpublic void moveToTime(float time)
time
- animation offset in secondspublic boolean playing()