org.newdawn.slick.state.transition
Class FadeInTransition

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

public class FadeInTransition
extends java.lang.Object
implements Transition

A transition to fade in from a given colour

Author:
kevin

Constructor Summary
FadeInTransition()
          Create a new fade in transition
FadeInTransition(Color color)
          Create a new fade in transition
FadeInTransition(Color color, int fadeTime)
          Create a new fade in transition
 
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

FadeInTransition

public FadeInTransition()
Create a new fade in transition


FadeInTransition

public FadeInTransition(Color color)
Create a new fade in transition

Parameters:
color - The color we're going to fade in from

FadeInTransition

public FadeInTransition(Color color,
                        int fadeTime)
Create a new fade in transition

Parameters:
color - The color we're going to fade in from
fadeTime - The time it takes for the fade to occur
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)
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
See Also:
Transition.postRender(org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)

update

public void update(StateBasedGame game,
                   GameContainer container,
                   int delta)
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
See Also:
Transition.update(org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.GameContainer, int)

preRender

public void preRender(StateBasedGame game,
                      GameContainer container,
                      Graphics g)
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
See Also:
Transition.preRender(org.newdawn.slick.state.StateBasedGame, org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)

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.