|
PulpCore | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object pulpcore.animation.Animation pulpcore.animation.Timeline
public final class Timeline
A Timeline is a list of Animations.
Field Summary |
---|
Fields inherited from class pulpcore.animation.Animation |
---|
LOOP_FOREVER |
Constructor Summary | |
---|---|
Timeline()
|
|
Timeline(Easing easing)
|
|
Timeline(Easing easing,
int startDelay)
|
|
Timeline(int startDelay)
|
Method Summary | |
---|---|
void |
add(Animation animation)
|
void |
add(Property property,
Animation animation)
|
void |
addEvent(TimelineEvent event)
Adds an event to the timeline. |
Timeline |
after()
Creates a child timeline that starts at end of this timeline. |
Timeline |
after(int time)
Creates a child timeline that starts at the specified time relative to the end of this timeline. |
void |
animate(Color property,
int fromARGB,
int toARGB,
int duration)
|
void |
animate(Color property,
int fromARGB,
int toARGB,
int duration,
Easing easing)
|
void |
animate(Color property,
int fromARGB,
int toARGB,
int duration,
Easing easing,
int startDelay)
|
void |
animate(Fixed property,
double fromValue,
double toValue,
int duration)
|
void |
animate(Fixed property,
double fromValue,
double toValue,
int duration,
Easing easing)
|
void |
animate(Fixed property,
double fromValue,
double toValue,
int duration,
Easing easing,
int startDelay)
|
void |
animate(Fixed property,
int fromValue,
int toValue,
int duration)
|
void |
animate(Fixed property,
int fromValue,
int toValue,
int duration,
Easing easing)
|
void |
animate(Fixed property,
int fromValue,
int toValue,
int duration,
Easing easing,
int startDelay)
|
void |
animate(Int property,
int fromValue,
int toValue,
int duration)
|
void |
animate(Int property,
int fromValue,
int toValue,
int duration,
Easing easing)
|
void |
animate(Int property,
int fromValue,
int toValue,
int duration,
Easing easing,
int startDelay)
|
void |
animate(Property property,
Animation animation)
Deprecated. Replaced by add(Property, Animation) |
void |
animateAsFixed(Fixed property,
int fFromValue,
int fToValue,
int duration)
|
void |
animateAsFixed(Fixed property,
int fFromValue,
int fToValue,
int duration,
Easing easing)
|
void |
animateAsFixed(Fixed property,
int fFromValue,
int fToValue,
int duration,
Easing easing,
int startDelay)
|
void |
animateTo(Color property,
int toARGB,
int duration)
|
void |
animateTo(Color property,
int toARGB,
int duration,
Easing easing)
|
void |
animateTo(Color property,
int toARGB,
int duration,
Easing easing,
int startDelay)
|
void |
animateTo(Fixed property,
double toValue,
int duration)
|
void |
animateTo(Fixed property,
double toValue,
int duration,
Easing easing)
|
void |
animateTo(Fixed property,
double toValue,
int duration,
Easing easing,
int startDelay)
|
void |
animateTo(Fixed property,
int toValue,
int duration)
|
void |
animateTo(Fixed property,
int toValue,
int duration,
Easing easing)
|
void |
animateTo(Fixed property,
int toValue,
int duration,
Easing easing,
int startDelay)
|
void |
animateTo(Int property,
int toValue,
int duration)
|
void |
animateTo(Int property,
int toValue,
int duration,
Easing easing)
|
void |
animateTo(Int property,
int toValue,
int duration,
Easing easing,
int startDelay)
|
void |
animateToFixed(Fixed property,
int fToValue,
int duration)
|
void |
animateToFixed(Fixed property,
int fToValue,
int duration,
Easing easing)
|
void |
animateToFixed(Fixed property,
int fToValue,
int duration,
Easing easing,
int startDelay)
|
Timeline |
at(int time)
Creates a child timeline that starts at the specified time relative to the start of this timeline. |
double |
getPlaySpeed()
|
void |
interruptScene(Scene scene,
int delay)
|
boolean |
isPlaying()
|
void |
move(Sprite sprite,
double x1,
double y1,
double x2,
double y2,
int duration)
|
void |
move(Sprite sprite,
double x1,
double y1,
double x2,
double y2,
int duration,
Easing easing)
|
void |
move(Sprite sprite,
double x1,
double y1,
double x2,
double y2,
int duration,
Easing easing,
int startDelay)
|
void |
move(Sprite sprite,
int x1,
int y1,
int x2,
int y2,
int duration)
|
void |
move(Sprite sprite,
int x1,
int y1,
int x2,
int y2,
int duration,
Easing easing)
|
void |
move(Sprite sprite,
int x1,
int y1,
int x2,
int y2,
int duration,
Easing easing,
int startDelay)
|
void |
move(Sprite sprite,
Path path,
double startP,
double endP,
int duration)
|
void |
move(Sprite sprite,
Path path,
double startP,
double endP,
int duration,
Easing easing)
|
void |
move(Sprite sprite,
Path path,
double startP,
double endP,
int duration,
Easing easing,
int startDelay)
|
void |
moveAndRotate(Sprite sprite,
Path path,
double startP,
double endP,
int duration)
|
void |
moveAndRotate(Sprite sprite,
Path path,
double startP,
double endP,
int duration,
Easing easing)
|
void |
moveAndRotate(Sprite sprite,
Path path,
double startP,
double endP,
int duration,
Easing easing,
int startDelay)
|
void |
moveTo(Sprite sprite,
double x,
double y,
int duration)
|
void |
moveTo(Sprite sprite,
double x,
double y,
int duration,
Easing easing)
|
void |
moveTo(Sprite sprite,
double x,
double y,
int duration,
Easing easing,
int startDelay)
|
void |
moveTo(Sprite sprite,
int x,
int y,
int duration)
|
void |
moveTo(Sprite sprite,
int x,
int y,
int duration,
Easing easing)
|
void |
moveTo(Sprite sprite,
int x,
int y,
int duration,
Easing easing,
int startDelay)
|
void |
notifyChildren()
Calls notifyAll() on all child TimelineEvents, waking any threads that are waiting for them to execute. |
void |
pause()
|
void |
play()
|
void |
playSound(Sound sound,
int delay)
|
void |
scale(Sprite sprite,
double width1,
double height1,
double width2,
double height2,
int duration)
|
void |
scale(Sprite sprite,
double width1,
double height1,
double width2,
double height2,
int duration,
Easing easing)
|
void |
scale(Sprite sprite,
double width1,
double height1,
double width2,
double height2,
int duration,
Easing easing,
int startDelay)
|
void |
scale(Sprite sprite,
int width1,
int height1,
int width2,
int height2,
int duration)
|
void |
scale(Sprite sprite,
int width1,
int height1,
int width2,
int height2,
int duration,
Easing easing)
|
void |
scale(Sprite sprite,
int width1,
int height1,
int width2,
int height2,
int duration,
Easing easing,
int startDelay)
|
void |
scaleTo(Sprite sprite,
double width,
double height,
int duration)
|
void |
scaleTo(Sprite sprite,
double width,
double height,
int duration,
Easing easing)
|
void |
scaleTo(Sprite sprite,
double width,
double height,
int duration,
Easing easing,
int startDelay)
|
void |
scaleTo(Sprite sprite,
int width,
int height,
int duration)
|
void |
scaleTo(Sprite sprite,
int width,
int height,
int duration,
Easing easing)
|
void |
scaleTo(Sprite sprite,
int width,
int height,
int duration,
Easing easing,
int startDelay)
|
void |
set(Bool property,
boolean value)
|
void |
set(Bool property,
boolean value,
int delay)
|
void |
set(Color property,
int value)
|
void |
set(Color property,
int value,
int delay)
|
void |
set(Fixed property,
double value)
|
void |
set(Fixed property,
double value,
int delay)
|
void |
set(Fixed property,
int value)
|
void |
set(Fixed property,
int value,
int delay)
|
void |
set(Int property,
int value)
|
void |
set(Int property,
int value,
int delay)
|
void |
setAsFixed(Fixed property,
int value)
|
void |
setAsFixed(Fixed property,
int fValue,
int delay)
|
void |
setLocation(Sprite sprite,
double x,
double y)
|
void |
setLocation(Sprite sprite,
double x,
double y,
int delay)
|
void |
setLocation(Sprite sprite,
int x,
int y)
|
void |
setLocation(Sprite sprite,
int x,
int y,
int delay)
|
void |
setPlaySpeed(double speed)
Sets the play speed. |
void |
setScene(Scene scene,
int delay)
|
void |
setSize(Sprite sprite,
double width,
double height)
|
void |
setSize(Sprite sprite,
double width,
double height,
int delay)
|
void |
setSize(Sprite sprite,
int width,
int height)
|
void |
setSize(Sprite sprite,
int width,
int height,
int delay)
|
void |
stop()
|
protected void |
updateState(int animTime)
Updates the state based on the animation time, typically from 0 to Animation.getDuration() . |
Methods inherited from class pulpcore.animation.Animation |
---|
fastForward, getDuration, getEasing, getLoopDelay, getNumLoops, getStartDelay, getTime, getTotalDuration, isFinished, loop, loop, loopForever, loopForever, rewind, update |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Timeline()
public Timeline(int startDelay)
public Timeline(Easing easing)
public Timeline(Easing easing, int startDelay)
Method Detail |
---|
public void setPlaySpeed(double speed)
public double getPlaySpeed()
public void pause()
public void play()
public void stop()
public boolean isPlaying()
protected void updateState(int animTime)
Animation
Animation.getDuration()
.
Note that the duration can be zero.
updateState
in class Animation
animTime
- The animation time, typically from 0 to Animation.getDuration()
, although
an Easing
can cause the value to be outside those bounds.public Timeline at(int time)
This method provides an alternative syntax for delayed animations:
timeline.at(500).animate(sprite.alpha, 0, 255, 500);
time
- Time in milliseconds.
public Timeline after()
This method provides an alternative syntax for delayed animations:
timeline.animate(sprite.alpha, 0, 255, 500); timeline.after().set(sprite.enabled, true);
public Timeline after(int time)
This method provides an alternative syntax for delayed animations. This code animates a sprite from x1 to x2, waits one second, then animates back from x2 to x1.
timeline.animate(sprite.x, x1, x2, 500); timeline.after(1000).animate(sprite.x, x2, x1, 500);
time
- Time in milliseconds (after the current end of this Timeline).
public void addEvent(TimelineEvent event)
public void animate(Property property, Animation animation)
add(Property, Animation)
public void add(Animation animation)
public void add(Property property, Animation animation)
public void notifyChildren()
public void setScene(Scene scene, int delay)
public void interruptScene(Scene scene, int delay)
public void playSound(Sound sound, int delay)
public void set(Bool property, boolean value)
public void set(Int property, int value)
public void set(Color property, int value)
public void setAsFixed(Fixed property, int value)
public void set(Fixed property, int value)
public void set(Fixed property, double value)
public void setLocation(Sprite sprite, int x, int y)
public void setLocation(Sprite sprite, double x, double y)
public void setSize(Sprite sprite, int width, int height)
public void setSize(Sprite sprite, double width, double height)
public void set(Bool property, boolean value, int delay)
public void set(Int property, int value, int delay)
public void set(Color property, int value, int delay)
public void setAsFixed(Fixed property, int fValue, int delay)
public void set(Fixed property, int value, int delay)
public void set(Fixed property, double value, int delay)
public void setLocation(Sprite sprite, int x, int y, int delay)
public void setLocation(Sprite sprite, double x, double y, int delay)
public void setSize(Sprite sprite, int width, int height, int delay)
public void setSize(Sprite sprite, double width, double height, int delay)
public void animate(Int property, int fromValue, int toValue, int duration)
public void animate(Int property, int fromValue, int toValue, int duration, Easing easing)
public void animate(Int property, int fromValue, int toValue, int duration, Easing easing, int startDelay)
public void animateTo(Int property, int toValue, int duration)
public void animateTo(Int property, int toValue, int duration, Easing easing)
public void animateTo(Int property, int toValue, int duration, Easing easing, int startDelay)
public void animate(Color property, int fromARGB, int toARGB, int duration)
public void animate(Color property, int fromARGB, int toARGB, int duration, Easing easing)
public void animate(Color property, int fromARGB, int toARGB, int duration, Easing easing, int startDelay)
public void animateTo(Color property, int toARGB, int duration)
public void animateTo(Color property, int toARGB, int duration, Easing easing)
public void animateTo(Color property, int toARGB, int duration, Easing easing, int startDelay)
public void animateAsFixed(Fixed property, int fFromValue, int fToValue, int duration)
public void animateAsFixed(Fixed property, int fFromValue, int fToValue, int duration, Easing easing)
public void animateAsFixed(Fixed property, int fFromValue, int fToValue, int duration, Easing easing, int startDelay)
public void animateToFixed(Fixed property, int fToValue, int duration)
public void animateToFixed(Fixed property, int fToValue, int duration, Easing easing)
public void animateToFixed(Fixed property, int fToValue, int duration, Easing easing, int startDelay)
public void animate(Fixed property, int fromValue, int toValue, int duration)
public void animate(Fixed property, int fromValue, int toValue, int duration, Easing easing)
public void animate(Fixed property, int fromValue, int toValue, int duration, Easing easing, int startDelay)
public void animateTo(Fixed property, int toValue, int duration)
public void animateTo(Fixed property, int toValue, int duration, Easing easing)
public void animateTo(Fixed property, int toValue, int duration, Easing easing, int startDelay)
public void animate(Fixed property, double fromValue, double toValue, int duration)
public void animate(Fixed property, double fromValue, double toValue, int duration, Easing easing)
public void animate(Fixed property, double fromValue, double toValue, int duration, Easing easing, int startDelay)
public void animateTo(Fixed property, double toValue, int duration)
public void animateTo(Fixed property, double toValue, int duration, Easing easing)
public void animateTo(Fixed property, double toValue, int duration, Easing easing, int startDelay)
public void move(Sprite sprite, int x1, int y1, int x2, int y2, int duration)
public void move(Sprite sprite, int x1, int y1, int x2, int y2, int duration, Easing easing)
public void move(Sprite sprite, int x1, int y1, int x2, int y2, int duration, Easing easing, int startDelay)
public void moveTo(Sprite sprite, int x, int y, int duration)
public void moveTo(Sprite sprite, int x, int y, int duration, Easing easing)
public void moveTo(Sprite sprite, int x, int y, int duration, Easing easing, int startDelay)
public void move(Sprite sprite, double x1, double y1, double x2, double y2, int duration)
public void move(Sprite sprite, double x1, double y1, double x2, double y2, int duration, Easing easing)
public void move(Sprite sprite, double x1, double y1, double x2, double y2, int duration, Easing easing, int startDelay)
public void moveTo(Sprite sprite, double x, double y, int duration)
public void moveTo(Sprite sprite, double x, double y, int duration, Easing easing)
public void moveTo(Sprite sprite, double x, double y, int duration, Easing easing, int startDelay)
public void move(Sprite sprite, Path path, double startP, double endP, int duration)
public void move(Sprite sprite, Path path, double startP, double endP, int duration, Easing easing)
public void move(Sprite sprite, Path path, double startP, double endP, int duration, Easing easing, int startDelay)
public void moveAndRotate(Sprite sprite, Path path, double startP, double endP, int duration)
public void moveAndRotate(Sprite sprite, Path path, double startP, double endP, int duration, Easing easing)
public void moveAndRotate(Sprite sprite, Path path, double startP, double endP, int duration, Easing easing, int startDelay)
public void scale(Sprite sprite, int width1, int height1, int width2, int height2, int duration)
public void scale(Sprite sprite, int width1, int height1, int width2, int height2, int duration, Easing easing)
public void scale(Sprite sprite, int width1, int height1, int width2, int height2, int duration, Easing easing, int startDelay)
public void scaleTo(Sprite sprite, int width, int height, int duration)
public void scaleTo(Sprite sprite, int width, int height, int duration, Easing easing)
public void scaleTo(Sprite sprite, int width, int height, int duration, Easing easing, int startDelay)
public void scale(Sprite sprite, double width1, double height1, double width2, double height2, int duration)
public void scale(Sprite sprite, double width1, double height1, double width2, double height2, int duration, Easing easing)
public void scale(Sprite sprite, double width1, double height1, double width2, double height2, int duration, Easing easing, int startDelay)
public void scaleTo(Sprite sprite, double width, double height, int duration)
public void scaleTo(Sprite sprite, double width, double height, int duration, Easing easing)
public void scaleTo(Sprite sprite, double width, double height, int duration, Easing easing, int startDelay)
|
PulpCore | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |