|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectanimation.AnimationScheduler
public class AnimationScheduler
This class can be used to schedule animation sequences
Constructor Summary | |
---|---|
AnimationScheduler(AbstractGameObject go)
|
Method Summary | |
---|---|
void |
add(java.lang.String name)
Adds an animation with infinite duration to the queue. |
void |
add(java.lang.String name,
long dur)
Adds an animation to the queue |
void |
clear()
Deletes the animations of the processing queue. |
void |
forceNext()
Sets the animation scheduler to the next animation. |
java.lang.String |
getCurrAnimName()
Returns the reference name of the currently active animation on schedule |
java.lang.String |
getNextAnimName()
Returns the name of the animation that follows on the current animation in the animation scheduler queue. |
java.util.LinkedList<Animation> |
getQueue()
Returns the queue of the animation scheduler |
void |
next()
Sets the animation scheduler to the next animation. |
void |
pause()
Stops the processing of the animation queue |
void |
removeFirst()
Removes the first element (current animation) from the animation queue, if there is one |
void |
resume()
Resumes the schedule |
void |
start()
Starts the processing of the animation queue from the beginning |
void |
update(long elapsedTime)
Updates the animation schedule |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AnimationScheduler(AbstractGameObject go)
Method Detail |
---|
public void add(java.lang.String name, long dur)
name
- animation reference namedur
- animation duration in milisecondspublic void add(java.lang.String name)
name
- animation refrence namepublic java.lang.String getCurrAnimName()
public java.lang.String getNextAnimName()
null
public void removeFirst()
public void start()
public void pause()
public void resume()
public void clear()
public void next()
public void forceNext()
public java.util.LinkedList<Animation> getQueue()
public void update(long elapsedTime)
elapsedTime
- time between two frames
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |