Make it easier for drop puzzles to implement their own fancy drop logic
if they've got that burning need to do something out of the ordinary. git-svn-id: svn+ssh://src.earth.threerings.net/vilya/trunk@371 c613c5cb-e716-0410-b11b-feb51c14d237
This commit is contained in:
@@ -106,7 +106,7 @@ public abstract class DropManagerDelegate extends PuzzleManagerDelegate
|
||||
// create the piece dropper if appropriate
|
||||
PieceDropLogic pdl = getPieceDropLogic();
|
||||
if (pdl != null) {
|
||||
_dropper = new PieceDropper(pdl);
|
||||
_dropper = getPieceDropper(pdl);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,14 +132,22 @@ public abstract class DropManagerDelegate extends PuzzleManagerDelegate
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the piece drop logic used to drop any pieces that need
|
||||
* dropping in the board.
|
||||
* Returns the piece drop logic used to drop any pieces that need dropping in the board.
|
||||
*/
|
||||
protected PieceDropLogic getPieceDropLogic ()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the piece dropper used to drop any pieces that need dropping in the board.
|
||||
*/
|
||||
protected PieceDropper getPieceDropper (PieceDropLogic logic)
|
||||
{
|
||||
return new PieceDropper(logic);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This method should be called by derived classes whenever the player
|
||||
* successfully places a drop block.
|
||||
|
||||
Reference in New Issue
Block a user