com.threerings.opengl.util
Class Phaser
java.lang.Object
com.threerings.opengl.util.Phaser
- All Implemented Interfaces:
- Tickable
public abstract class Phaser
- extends Object
- implements Tickable
Provides a convenient way to effect updates that proceed through a set of discrete phases (for
example: fade in, linger, fade out). Updates are always generated for phase end boundaries.
For example, if there are two phases (0.5, 0.5) and 10.0 seconds elapse, one update is generated
for the end of the first phase and one is generated for the end of the second phase.
|
Constructor Summary |
Phaser(Object... params)
Creates a new phaser. |
|
Method Summary |
void |
tick(float elapsed)
Updates the state of this object based on the elapsed time in seconds. |
Phaser
public Phaser(Object... params)
- Creates a new phaser.
- Parameters:
params - the names of the update methods to call for each phase and their corresponding
phase durations (example: "fadeIn", 1f, null, 2f, "fadeOut", 1f). Update
methods should be member methods with zero arguments.
tick
public void tick(float elapsed)
- Description copied from interface:
Tickable
- Updates the state of this object based on the elapsed time in seconds.
- Specified by:
tick in interface Tickable
Copyright © 2011. All Rights Reserved.