vooga.levelEditor.game.ballPathBuilder
Class BallPathBuilder

java.lang.Object
  extended by vooga.gameEngine.game.GameRelatedObject
      extended by vooga.gameEngine.game.AbstractGame
          extended by vooga.levelEditor.game.ballPathBuilder.BallPathBuilder
All Implemented Interfaces:
GameResetListener, PositionChangedListener, java.io.Serializable, java.util.EventListener, PauseListener, Editable

public class BallPathBuilder
extends AbstractGame
implements PositionChangedListener, GameResetListener, Editable

See Also:
Serialized Form

Field Summary
static java.util.ResourceBundle RESOURCES
           
 
Constructor Summary
BallPathBuilder(GameManager manager)
           
 
Method Summary
 boolean endGame()
          Ends the current game.
 boolean endLevel()
          Ends the current level.
 void GameReset(GameResetEvent e)
           
 java.lang.Integer[] getAllowedPlayerNumbers()
          Specifies what number of players are allowed in a network game.
 CameraController getCameraController()
          Provides access to the CameraController for this game.
 java.util.List<java.lang.Package> getGameItemPackages()
          Returns a list of packages in which a game's GameItems are stored.
static void main(java.lang.String[] args)
           
 void positionChanged(PositionChangedEvent e)
          Triggered when the position of an item changes.
 boolean quitGame()
          Quits the current game.
 boolean startGame()
          Initializes anything necessary for the game to start, and starts the game.
 boolean startLevel()
          Initializes anything necessary for a level to start, and starts the level.
 void whenPaused(boolean gameLoopPaused)
          Determines what should occur game-wise during an attempt to pause a game.
 void whenResumed()
          Defines what should occur game-wise during an attempt to resume the game.
 
Methods inherited from class vooga.gameEngine.game.AbstractGame
getManager, loadLevel, loadLevel, pauseStatusChanged, removeAllKeyInputs, removeAllKeyInputs, removeKeyInput, restartLevel, setKeyInput, setKeyInput, setMouseInput
 
Methods inherited from class vooga.gameEngine.game.GameRelatedObject
addEventListener, clearListeners, equals, fire, fire, fire, getEventListeners, getID, getListenerCount, removeEventListener
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCES

public static final java.util.ResourceBundle RESOURCES
Constructor Detail

BallPathBuilder

public BallPathBuilder(GameManager manager)
Method Detail

endGame

public boolean endGame()
Description copied from class: AbstractGame
Ends the current game. This method should be called by the instance of an AbstractGame when it is determined that the game is over.

Specified by:
endGame in class AbstractGame
Returns:
true if the game successfully ended; false otherwise

endLevel

public boolean endLevel()
Description copied from class: AbstractGame
Ends the current level. This method should be called by the instance of an AbstractGame when it is determined that the current level is over. Note: There is a EndLevelListener-EndLevelEvent pair provided for convenience. If used, the endLevelRequested method of the EndLevelListener should contain a call to this method.

Specified by:
endLevel in class AbstractGame
Returns:
true if the level was ended successfully; false otherwise

getAllowedPlayerNumbers

public java.lang.Integer[] getAllowedPlayerNumbers()
Description copied from class: AbstractGame
Specifies what number of players are allowed in a network game. This method returns an Array of Integers specifying which numbers of players are allowed during network play. Thus a game which supports 2 and 4 players but not 3 should return an array {2,4}. It is unlikely that a network game would ever allow a single player and thus should not return {1,...}. Games which are not networked need not implement this method.

Specified by:
getAllowedPlayerNumbers in class AbstractGame
Returns:
An array specifying all allowed numbers of players for a networked instance of a game.

getCameraController

public CameraController getCameraController()
Description copied from class: AbstractGame
Provides access to the CameraController for this game. This method will be called by the GameManager in order to set the CameraController.

Specified by:
getCameraController in class AbstractGame
Returns:
the CameraController

quitGame

public boolean quitGame()
Description copied from class: AbstractGame
Quits the current game. Differs from AbstractGame.endGame() in that this method would be called if the user attempts to quit in the middle of a game. This method should be called by the instance of an AbstractGame when it is determined that a quit is desired.

Specified by:
quitGame in class AbstractGame
Returns:
true if quit was successful; false otherwise

startGame

public boolean startGame()
Description copied from class: AbstractGame
Initializes anything necessary for the game to start, and starts the game. This method will be invoked by the game engine. Thus, an instance of an AbstractGame need not call this method.

Specified by:
startGame in class AbstractGame
Returns:
true if the game successfully started; false otherwise

startLevel

public boolean startLevel()
Description copied from class: AbstractGame
Initializes anything necessary for a level to start, and starts the level. Note that this method is called by AbstractGame.loadLevel(java.util.Collection), so all GameItemss have already been loaded. Note: There is a StartLevelListener-StartLevelEvent pair provided for convenience. If used, the startLevelRequested method of the StartLevelListener should contain a call to this method. Moreover, if one has a collection of items that define a particular level or a file that contains such items, this method can call AbstractGame.loadLevel(Collection) or AbstractGame.loadLevel(File) rather than adding them to the manager directly.

Specified by:
startLevel in class AbstractGame
Returns:
true if the level was started successfully; false otherwise

whenPaused

public void whenPaused(boolean gameLoopPaused)
Description copied from class: AbstractGame
Determines what should occur game-wise during an attempt to pause a game. Note that this method will be called by AbstractGame.pauseStatusChanged(PauseEvent).

Specified by:
whenPaused in class AbstractGame
Parameters:
gameLoopPaused - whether the game loop was successfully paused

whenResumed

public void whenResumed()
Description copied from class: AbstractGame
Defines what should occur game-wise during an attempt to resume the game. Note that this method will be called by AbstractGame.pauseStatusChanged(PauseEvent).

Specified by:
whenResumed in class AbstractGame

main

public static void main(java.lang.String[] args)

positionChanged

public void positionChanged(PositionChangedEvent e)
Description copied from interface: PositionChangedListener
Triggered when the position of an item changes.

Specified by:
positionChanged in interface PositionChangedListener
Parameters:
e - a reference to the Event

GameReset

public void GameReset(GameResetEvent e)
Specified by:
GameReset in interface GameResetListener

getGameItemPackages

public java.util.List<java.lang.Package> getGameItemPackages()
Description copied from interface: Editable
Returns a list of packages in which a game's GameItems are stored. The level editor will reflect on these packages to produce its item selection tree.

Specified by:
getGameItemPackages in interface Editable