com.threerings.parlor.media
Class ScoreAnimation

java.lang.Object
  extended by com.threerings.media.AbstractMedia
      extended by com.threerings.media.animation.Animation
          extended by com.threerings.media.animation.FloatingTextAnimation
              extended by com.threerings.parlor.media.ScoreAnimation
All Implemented Interfaces:
Shape

public class ScoreAnimation
extends com.threerings.media.animation.FloatingTextAnimation


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.media.animation.Animation
com.threerings.media.animation.Animation.AnimCompletedOp, com.threerings.media.animation.Animation.AnimStartedOp
 
Field Summary
 
Fields inherited from class com.threerings.media.animation.FloatingTextAnimation
_alpha, _comp, _destx, _desty, _dx, _dy, _floatPeriod, _label, _start, _startX, _startY, _x, _y, DEFAULT_FLOAT_PERIOD, DELTA_Y
 
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
ScoreAnimation(Label label, int x, int y)
          Constructs a score animation for the given score value centered at the given coordinates.
ScoreAnimation(Label label, int sx, int sy, int destx, int desty, long floatPeriod)
          Constructs a score animation for the given score value starting at the given coordinates and floating toward the specified coordinates.
ScoreAnimation(Label label, int x, int y, long floatPeriod)
          Constructs a score animation for the given score value centered at the given coordinates.
 
Method Summary
static Label createLabel(String score, Color c, Font font, Component host)
          Create and configure a Label suitable for a ScoreAnimation with all the most common options.
static Label createLabel(String score, Color c, Font font, com.threerings.media.MediaPanel host)
          Deprecated. This signature is retained for backwards compatibility.
 
Methods inherited from class com.threerings.media.animation.FloatingTextAnimation
fastForward, flipDirection, getLabel, paint, paintLabels, setFloatPeriod, setLocation, tick, toString
 
Methods inherited from class com.threerings.media.animation.Animation
addAnimationObserver, didFinish, isFinished, removeAnimationObserver, reset, willFinish, willStart
 
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, shutdown, toString, viewLocationDidChange
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScoreAnimation

public ScoreAnimation(Label label,
                      int x,
                      int y)
Constructs a score animation for the given score value centered at the given coordinates.


ScoreAnimation

public ScoreAnimation(Label label,
                      int x,
                      int y,
                      long floatPeriod)
Constructs a score animation for the given score value centered at the given coordinates. The animation will float up the screen for 30 pixels.


ScoreAnimation

public ScoreAnimation(Label label,
                      int sx,
                      int sy,
                      int destx,
                      int desty,
                      long floatPeriod)
Constructs a score animation for the given score value starting at the given coordinates and floating toward the specified coordinates.

Method Detail

createLabel

@Deprecated
public static Label createLabel(String score,
                                           Color c,
                                           Font font,
                                           com.threerings.media.MediaPanel host)
Deprecated. This signature is retained for backwards compatibility.

Create and configure a Label suitable for a ScoreAnimation with all the most common options.


createLabel

public static Label createLabel(String score,
                                Color c,
                                Font font,
                                Component host)
Create and configure a Label suitable for a ScoreAnimation with all the most common options.