Added startActionImmediately(), put it to use.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3081 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PuzzleController.java,v 1.10 2004/06/22 14:08:58 mdb Exp $
|
// $Id: PuzzleController.java,v 1.11 2004/08/16 22:58:23 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.puzzle.client;
|
package com.threerings.puzzle.client;
|
||||||
|
|
||||||
@@ -311,6 +311,18 @@ public abstract class PuzzleController extends GameController
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Indicates whether the action should start immediately as a result
|
||||||
|
* of {@link #gameDidStart} being called. If a puzzle wishes to do
|
||||||
|
* some beginning of the game fun stuff, like display a tutorial
|
||||||
|
* screen, they can veto the action start and then start it themselves
|
||||||
|
* later.
|
||||||
|
*/
|
||||||
|
protected boolean startActionImmediately ()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A way for controllers to display a puzzle-related system message.
|
* A way for controllers to display a puzzle-related system message.
|
||||||
*/
|
*/
|
||||||
@@ -330,7 +342,9 @@ public abstract class PuzzleController extends GameController
|
|||||||
public int actionCleared () {
|
public int actionCleared () {
|
||||||
// do the standard game did start business
|
// do the standard game did start business
|
||||||
PuzzleController.super.gameDidStart();
|
PuzzleController.super.gameDidStart();
|
||||||
return RESTART_ACTION;
|
// we don't always start the action immediately
|
||||||
|
return startActionImmediately() ?
|
||||||
|
RESTART_ACTION : NO_RESTART_ACTION;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user