org.jrabbit.standard.game.managers
Class GameManager

java.lang.Object
  extended by org.jrabbit.standard.game.managers.GameManager

public class GameManager
extends java.lang.Object

GameManager provides some general, universal-access controls for managing games using the standard jRabbit setup. None of the content managed by this class is from the base package; GameManager is solely devoted to things in the standard game package (World, GameLoop, etc).

Author:
Chris Molini

Field Summary
private static java.util.Stack<GameLoop> gameLoops
          GameLoops are allowed to be "recursive"; that is, one may begin execution and looping while another is active.
private static SoundBoard soundBoard
          The object that manages general volume and pitch settings for Sounds being played.
 
Constructor Summary
GameManager()
           
 
Method Summary
static Camera camera()
          Accesses the currently active Camera.
static void create()
          Initializes all settings used by the standard jRabbit implementation.
static GameLoop currentLoop()
          Accesses the GameLoop that is currently operating.
static java.util.Stack<GameLoop> gameLoops()
          Accesses the Stack of GameLoops.
static void setSoundBoard(SoundBoard soundboard)
          Redefines the current SoundBoard.
static void setWorld(World world)
          Redefines the current World.
static SoundBoard soundBoard()
          Accesses the SoundBoard.
static World world()
          Accesses the current World.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gameLoops

private static java.util.Stack<GameLoop> gameLoops
GameLoops are allowed to be "recursive"; that is, one may begin execution and looping while another is active. The new GameLoop will operate as expected, and when it is finished, the old loop will resume where it left off. This Stack keeps track of the actively running loops.


soundBoard

private static SoundBoard soundBoard
The object that manages general volume and pitch settings for Sounds being played.

Constructor Detail

GameManager

public GameManager()
Method Detail

gameLoops

public static java.util.Stack<GameLoop> gameLoops()
Accesses the Stack of GameLoops. This will probably usually have only one entry on it.

Returns:
The list of all active GameLoops.

currentLoop

public static GameLoop currentLoop()
Accesses the GameLoop that is currently operating.

Returns:
The current GameLoop.

soundBoard

public static SoundBoard soundBoard()
Accesses the SoundBoard.

Returns:
The general control for volume and pitch settings.

setSoundBoard

public static void setSoundBoard(SoundBoard soundboard)
Redefines the current SoundBoard.

Parameters:
soundboard - The new SoundBoard to use for Sound equalization.

world

public static World world()
Accesses the current World.

Returns:
The current World reference of the GameLoop.

setWorld

public static void setWorld(World world)
Redefines the current World.

Parameters:
world - The new World to use for updating and rendering.

camera

public static Camera camera()
Accesses the currently active Camera.

Returns:
The active Camera of the active World.

create

public static void create()
Initializes all settings used by the standard jRabbit implementation.