org.newdawn.slick.state.transition
Class EmptyTransition

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

public class EmptyTransition
extends java.lang.Object
implements Transition

A transition that has no effect and instantly finishes. Used as a utility for the people not using transitions

Author:
kevin

Constructor Summary
EmptyTransition()
           
 
Method Summary
 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

EmptyTransition

public EmptyTransition()
Method Detail

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.