com.jmex.game.state.load
Class TransitionGameState

java.lang.Object
  extended by com.jmex.game.state.GameState
      extended by com.jmex.game.state.load.LoadingGameState
          extended by com.jmex.game.state.load.TransitionGameState
All Implemented Interfaces:
Loader

public class TransitionGameState
extends LoadingGameState

TransitionGameState The transition game state provides additional functionality to LoadingGameState. A background image is now shown during the loading phase of LoadingGameState. In addition, if a lead in game state is provided, the transition state will fade frame the previous game state into the loading state and then fade away. The lead in game state will be deactivated once the transition is complete, but not removed from the game state manager.

Author:
Andrew Carter

Field Summary
protected  Quad background
          Background image will be on this
 
Fields inherited from class com.jmex.game.state.load.LoadingGameState
alphaState, color, rootNode
 
Fields inherited from class com.jmex.game.state.GameState
active, name, parent
 
Constructor Summary
TransitionGameState(GameState leadIn, int steps, java.net.URL imagePath)
          Constructs a new Transition state fading from one game state to another.
TransitionGameState(GameState leadIn, java.net.URL imagePath)
          Constructs a new Transition state fading from one game state to another.
TransitionGameState(int steps, java.net.URL imagePath)
          Constructs a new Transition state without fading from the previous game state.
TransitionGameState(java.net.URL imagePath)
          Constructs a new Transition state without fading from the previous game state.
 
Method Summary
 
Methods inherited from class com.jmex.game.state.load.LoadingGameState
cleanup, increment, increment, increment, increment, init, render, setAlpha, setProgress, setProgress, update
 
Methods inherited from class com.jmex.game.state.GameState
getName, getParent, isActive, setActive, setName, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

background

protected Quad background
Background image will be on this

Constructor Detail

TransitionGameState

public TransitionGameState(java.net.URL imagePath)
Constructs a new Transition state without fading from the previous game state. Essentially the LoadingGameState but with a background image.

Parameters:
imagePath - URL for a background image, null if none

TransitionGameState

public TransitionGameState(int steps,
                           java.net.URL imagePath)
Constructs a new Transition state without fading from the previous game state. Essentially the LoadingGameState but with a background image.

Parameters:
steps - percentage increments
imagePath - URL for a background image, null if none

TransitionGameState

public TransitionGameState(GameState leadIn,
                           java.net.URL imagePath)
Constructs a new Transition state fading from one game state to another.

Parameters:
leadIn - previous game state
imagePath - URL for a background image, null if none

TransitionGameState

public TransitionGameState(GameState leadIn,
                           int steps,
                           java.net.URL imagePath)
Constructs a new Transition state fading from one game state to another.

Parameters:
leadIn - previous game state
steps - percentage increments
imagePath - URL for a background image, null if none