org.newdawn.slick.state.transition
Class CombinedTransition

java.lang.Object
  extended by org.newdawn.slick.state.transition.CombinedTransition
All Implemented Interfaces:
Transition

public class CombinedTransition
extends java.lang.Object
implements Transition

A transition thats built of a set of other transitions which are chained together to build the overall effect.

Author:
kevin

Constructor Summary
CombinedTransition()
          Create an empty transition
 
Method Summary
 void addTransition(Transition t)
          Add a transition to the list that will be combined to form the final transition
 void init(GameState firstState, GameState secondState)
          Initialise the transition
 boolean isComplete()
          Check if this transtion has been completed
 void postRender(StateBasedGame game, GameContainer container, Graphics g)
          Render the transition over the existing state rendering
 void preRender(StateBasedGame game, GameContainer container, Graphics g)
          Render the transition before the existing state rendering
 void update(StateBasedGame game, GameContainer container, int delta)
          Update the transition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CombinedTransition

public CombinedTransition()
Create an empty transition

Method Detail

addTransition

public void addTransition(Transition t)
Add a transition to the list that will be combined to form the final transition

Parameters:
t - The transition to add

isComplete

public boolean isComplete()
Description copied from interface: Transition
Check if this transtion has been completed

Specified by:
isComplete in interface Transition
Returns:
True if the transition has been completed
See Also:
Transition.isComplete()

postRender

public void postRender(StateBasedGame game,
                       GameContainer container,
                       Graphics g)
                throws SlickException
Description copied from interface: Transition
Render the transition over the existing state rendering

Specified by:
postRender in interface Transition
Parameters:
game - The game this transition is being rendered as part of
container - The container holding the game
g - The graphics context to use when rendering the transiton
Throws:
SlickException - Indicates a failure occured during the render
See Also:
Transition.postRender(org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)

preRender

public void preRender(StateBasedGame game,
                      GameContainer container,
                      Graphics g)
               throws SlickException
Description copied from interface: Transition
Render the transition before the existing state rendering

Specified by:
preRender in interface Transition
Parameters:
game - The game this transition is being rendered as part of
container - The container holding the game
g - The graphics context to use when rendering the transiton
Throws:
SlickException - Indicates a failure occured during the render
See Also:
Transition.preRender(org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)

update

public void update(StateBasedGame game,
                   GameContainer container,
                   int delta)
            throws SlickException
Description copied from interface: Transition
Update the transition. Cause what ever happens in the transition to happen

Specified by:
update in interface Transition
Parameters:
game - The game this transition is being rendered as part of
container - The container holding the game
delta - The amount of time passed since last update
Throws:
SlickException - Indicates a failure occured during the update
See Also:
Transition.update(org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.GameContainer, int)

init

public void init(GameState firstState,
                 GameState secondState)
Description copied from interface: Transition
Initialise the transition

Specified by:
init in interface Transition
Parameters:
firstState - The first state we're rendering (this will be rendered by the framework)
secondState - The second stat we're transitioning to or from (this one won't be rendered)


Copyright © 2006 New Dawn Software. All Rights Reserved.