|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbluegammon.gui.animation.Animation
bluegammon.gui.animation.WinnerPieceMoveAnim
Animation that flies away with a piece. Used from WinnerAnim
when there is a winner of the game.
WinnerAnim
Constructor Summary | |
WinnerPieceMoveAnim(WinnerAnim winAnim,
boolean white,
int source,
int destX,
int destY,
int piecesOnSource)
Creates a piece movement animation for the winning animation. |
Method Summary | |
long |
getInterval()
Returns interval time in milliseconds when the animation should be updated, i.e. the next method is invoked. |
boolean |
isFinished()
Probes to check if the animation can be removed |
void |
next()
Called each time the animation should be updated. |
void |
onExit()
Called when animation exits, adds this disappering piece to the main winner animation. |
void |
onStart()
Called when animation starts, removes start piece from canvas - piece now on move. |
void |
paint(javax.microedition.lcdui.Graphics g)
Draws the animation using the specified graphics context. |
Methods inherited from class bluegammon.gui.animation.Animation |
callNext, getLastInvoke |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public WinnerPieceMoveAnim(WinnerAnim winAnim, boolean white, int source, int destX, int destY, int piecesOnSource)
winAnim
- The WinnerAnim
.white
- True for white piece, false for black.source
- Source index of piece to animate.destX
- Destination x-coordinate of piece animation.destY
- Destination y-coordinate of piece animation.piecesOnSource
- Number of pieces on source row.Method Detail |
public void onStart()
onStart
in class Animation
public void paint(javax.microedition.lcdui.Graphics g)
Animation
paint
in class Animation
g
- The graphics context.public void next()
Animation
next
in class Animation
public boolean isFinished()
Animation
isFinished
in class Animation
public void onExit()
onExit
in class Animation
public long getInterval()
Animation
next
method is invoked.
getInterval
in class Animation
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |