Changed our frame participant to be a non-anynonmous class to support

subclassing it in the SwordController.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3693 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2005-09-01 21:52:19 +00:00
parent d5ec5675d7
commit c3f418d1ac
@@ -829,16 +829,15 @@ public abstract class PuzzleController extends GameController
protected PuzzlePanel _panel; protected PuzzlePanel _panel;
} }
/** The mouse jockey for unpausing our puzzles. */ /** A special frame participant that handles the sending of puzzle
protected Unpauser _unpauser; * progress updates. We can't just
/** Handles the sending of puzzle progress updates. We can't just
* register an interval for this because sometimes the clock goes * register an interval for this because sometimes the clock goes
* backwards in time in windows and our intervals don't get called for * backwards in time in windows and our intervals don't get called for
* a long period of time which causes the server to think the client * a long period of time which causes the server to think the client
* is disconnected or cheating and resign them from the puzzle. God * is disconnected or cheating and resign them from the puzzle. God
* bless you, Microsoft. */ * bless you, Microsoft. */
protected FrameParticipant _updater = new FrameParticipant() { protected class Updater implements FrameParticipant
{
public void tick (long tickStamp) { public void tick (long tickStamp) {
if (_astate == ACTION_CLEARED) { if (_astate == ACTION_CLEARED) {
// remove ourselves as the action is now cleared; we can't // remove ourselves as the action is now cleared; we can't
@@ -862,8 +861,22 @@ public abstract class PuzzleController extends GameController
return null; return null;
} }
protected long _lastProgressTick; public long _lastProgressTick;
}; }
/**
* Create the updater to be used in this puzzle.
*/
protected Updater createUpdater ()
{
return new Updater();
}
/** The mouse jockey for unpausing our puzzles. */
protected Unpauser _unpauser;
/** Handles the sending of puzzle progress updates. */
protected Updater _updater = createUpdater();
/** Listens for players being knocked out. */ /** Listens for players being knocked out. */
protected ElementUpdateListener _kolist = new ElementUpdateListener() { protected ElementUpdateListener _kolist = new ElementUpdateListener() {