|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.media.AbstractMedia
com.threerings.media.animation.Animation
com.threerings.media.animation.GleamAnimation
public class GleamAnimation
Washes all non-transparent pixels in a sprite with a particular color (by compositing them with the solid color with progressively higher alpha values) and then back again.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.threerings.media.animation.Animation |
|---|
Animation.AnimCompletedOp, Animation.AnimStartedOp |
| Field Summary | |
|---|---|
protected int |
_alpha
|
protected Color |
_color
|
protected TimeFunction |
_downfunc
|
protected int |
_downmillis
|
protected boolean |
_fadeIn
|
protected long |
_lastUpdate
|
protected int |
_maxAlpha
|
protected int |
_millisBetweenUpdates
|
protected int |
_minAlpha
|
protected Image |
_offimg
|
protected SpriteManager |
_spmgr
|
protected Sprite |
_sprite
|
protected TimeFunction |
_upfunc
|
protected int |
_upmillis
|
| Fields inherited from class com.threerings.media.animation.Animation |
|---|
_finished |
| Fields inherited from class com.threerings.media.AbstractMedia |
|---|
_bounds, _firstTick, _mgr, _observers, _renderOrder, HUD_LAYER |
| Constructor Summary | |
|---|---|
GleamAnimation(Sprite sprite,
Color color,
int upmillis,
int downmillis,
boolean fadeIn)
Creates a gleam animation with the supplied sprite. |
|
GleamAnimation(SpriteManager spmgr,
Sprite sprite,
Color color,
int upmillis,
int downmillis,
boolean fadeIn)
Creates a gleam animation with the supplied sprite. |
|
| Method Summary | |
|---|---|
void |
fastForward(long timeDelta)
Called when the appropriate media manager has been paused for some length of time and is then unpaused. |
void |
paint(Graphics2D gfx)
Called by the appropriate manager to request that the media render itself with the given graphics context. |
protected void |
shutdown()
Called by the media manager after the media is removed from service. |
void |
tick(long timestamp)
Called periodically by this media's manager to give it a chance to do its thing. |
protected void |
willStart(long tickStamp)
Prior to the first call to AbstractMedia.tick(long) on an abstract media, this method is called by the
AbstractMediaManager. |
| Methods inherited from class com.threerings.media.animation.Animation |
|---|
addAnimationObserver, didFinish, isFinished, removeAnimationObserver, reset, setLocation, willFinish |
| Methods inherited from class com.threerings.media.AbstractMedia |
|---|
addObserver, contains, contains, contains, contains, getBounds, getBounds2D, getPathIterator, getPathIterator, getRenderOrder, init, init, intersects, intersects, invalidate, invalidateAfterChange, naturalCompareTo, queueNotification, removeObserver, renderCompareTo, setRenderOrder, toString, toString, viewLocationDidChange |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected SpriteManager _spmgr
protected Sprite _sprite
protected Color _color
protected Image _offimg
protected boolean _fadeIn
protected TimeFunction _upfunc
protected TimeFunction _downfunc
protected int _upmillis
protected int _downmillis
protected int _maxAlpha
protected int _minAlpha
protected int _alpha
protected long _lastUpdate
protected int _millisBetweenUpdates
| Constructor Detail |
|---|
public GleamAnimation(Sprite sprite,
Color color,
int upmillis,
int downmillis,
boolean fadeIn)
fadeIn - if true, the sprite itself will be faded in as we fade up to the gleam color
and the gleam color will fade out, leaving just the sprite imagery.
public GleamAnimation(SpriteManager spmgr,
Sprite sprite,
Color color,
int upmillis,
int downmillis,
boolean fadeIn)
fadeIn - if true, the sprite itself will be faded in as we fade up to the gleam color
and the gleam color will fade out, leaving just the sprite imagery.| Method Detail |
|---|
public void tick(long timestamp)
AbstractMedia
tick in class AbstractMediatimestamp - a time stamp associated with this tick. Note: this is not obtained
from a call to System.currentTimeMillis() and cannot be compared to timestamps
obtained there from.public void fastForward(long timeDelta)
AbstractMedia
fastForward in class AbstractMediapublic void paint(Graphics2D gfx)
AbstractMedia
paint in class AbstractMediaprotected void willStart(long tickStamp)
AbstractMediaAbstractMedia.tick(long) on an abstract media, this method is called by the
AbstractMediaManager. It is called during the normal tick cycle, immediately prior
to the first call to AbstractMedia.tick(long).
Note: It is imperative that super.willStart() is called by any
entity that overrides this method because the AbstractMediaManager depends on the
setting of the AbstractMedia._firstTick value to know whether or not to call this method.
willStart in class Animationprotected void shutdown()
AbstractMediasuper.shutdown().
shutdown in class AbstractMedia
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||