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.
|
double |
currentTime
The current animation time
|
double |
duration
The current animation duration
|
boolean |
playing
true if the animation is currently playing
|
Constructor and Description |
---|
HKTimeline() |
Modifier and Type | Method and Description |
---|---|
void |
loop(java.lang.String chapterId)
Jump to the chapter with the given ID and play it in a loop
|
void |
moveToChapter(java.lang.String chapterId)
Jump to the chapter with the given ID
|
void |
moveToTime(double time)
Jump to the given time in the current scene's current animation
|
void |
nextChapter()
Jump to the next chapter
|
void |
pause()
Pause the animation
|
void |
play()
Play the animation from the beginning
|
void |
prevChapter()
Jump to the previous chapter
|
void |
unpause()
Unpause the animation
|
public HKChapter currentChapter
public java.util.HashMap<java.lang.String,HKChapter> chapters
public java.util.ArrayList<java.lang.String> chapterList
public double currentTime
public double duration
public boolean playing
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(double time)
time
- animation offset in secondspublic void loop(java.lang.String chapterId)
chapterId
- ID of the chapter