com.threerings.puzzle.client
Class PuzzleAnimationWaiter

java.lang.Object
  extended by com.threerings.media.animation.AnimationWaiter
      extended by com.threerings.puzzle.client.PuzzleAnimationWaiter
All Implemented Interfaces:
com.threerings.media.animation.AnimationObserver

public abstract class PuzzleAnimationWaiter
extends com.threerings.media.animation.AnimationWaiter

An animation waiter to be used with puzzles that want to modify the game object or board in some way after the animations end, and would like to do so in a safe fashion such that their changes aren't unwittingly performed on game data for a subsequent round of the puzzle.


Field Summary
protected  PuzzleObject _puzobj
          The puzzle object that the animations we're observering want to modify.
protected  int _sessionId
          The initial session id.
 
Fields inherited from class com.threerings.media.animation.AnimationWaiter
_animCount
 
Constructor Summary
PuzzleAnimationWaiter(PuzzleObject puzobj)
          Constructs a puzzle animation waiter.
 
Method Summary
protected  void allAnimationsFinished()
           
protected abstract  void allAnimationsFinished(boolean puzStillValid)
          Replacement for AnimationWaiter.allAnimationsFinished() that also reports whether the puzzle associated with this animation waiter is still valid.
 boolean puzzleStillValid()
          Returns whether the puzzle associated with this puzzle animation waiter is still valid.
 
Methods inherited from class com.threerings.media.animation.AnimationWaiter
addAnimation, addAnimations, animationCompleted, animationDidFinish, animationStarted
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_sessionId

protected int _sessionId
The initial session id.


_puzobj

protected PuzzleObject _puzobj
The puzzle object that the animations we're observering want to modify.

Constructor Detail

PuzzleAnimationWaiter

public PuzzleAnimationWaiter(PuzzleObject puzobj)
Constructs a puzzle animation waiter.

Method Detail

puzzleStillValid

public boolean puzzleStillValid()
Returns whether the puzzle associated with this puzzle animation waiter is still valid.


allAnimationsFinished

protected final void allAnimationsFinished()
Overrides:
allAnimationsFinished in class com.threerings.media.animation.AnimationWaiter

allAnimationsFinished

protected abstract void allAnimationsFinished(boolean puzStillValid)
Replacement for AnimationWaiter.allAnimationsFinished() that also reports whether the puzzle associated with this animation waiter is still valid.