org.newdawn.slick.tests
Class TransformTest2

java.lang.Object
  extended by org.newdawn.slick.BasicGame
      extended by org.newdawn.slick.tests.TransformTest2
All Implemented Interfaces:
ControlledInputReciever, ControllerListener, Game, InputListener, KeyListener, MouseListener

public class TransformTest2
extends BasicGame

A test for transforming the graphics context

Author:
Jesse Aldridge

Field Summary
 
Fields inherited from class org.newdawn.slick.BasicGame
controllerButton, controllerDown, controllerLeft, controllerRight, controllerUp
 
Constructor Summary
TransformTest2()
          Create a new test of graphics context rendering
 
Method Summary
 void init(GameContainer container)
          Initialise the game.
 void keyPressed(int key, char c)
          Notification that a key was pressed
 void keyReleased(int key, char c)
          Notification that a key was released
static void main(java.lang.String[] argv)
          Entry point to our test
 void render(GameContainer contiainer, Graphics g)
          Render the game's screen here.
 void update(GameContainer container, int delta)
          Update the game logic here.
 
Methods inherited from class org.newdawn.slick.BasicGame
closeRequested, controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased, getTitle, inputEnded, inputStarted, isAcceptingInput, mouseClicked, mouseDragged, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TransformTest2

public TransformTest2()
Create a new test of graphics context rendering

Method Detail

init

public void init(GameContainer container)
          throws SlickException
Description copied from interface: Game
Initialise the game. This can be used to load static resources. It's called before the game loop starts

Specified by:
init in interface Game
Specified by:
init in class BasicGame
Parameters:
container - The container holding the game
Throws:
SlickException - Throw to indicate an internal error
See Also:
BasicGame.init(org.newdawn.slick.GameContainer)

render

public void render(GameContainer contiainer,
                   Graphics g)
Description copied from interface: Game
Render the game's screen here.

Parameters:
contiainer - The container holing this game
g - The graphics context that can be used to render. However, normal rendering routines can also be used.
See Also:
Game.render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)

update

public void update(GameContainer container,
                   int delta)
Description copied from interface: Game
Update the game logic here. No rendering should take place in this method though it won't do any harm.

Specified by:
update in interface Game
Specified by:
update in class BasicGame
Parameters:
container - The container holing this game
delta - The amount of time thats passed since last update in milliseconds
See Also:
BasicGame.update(org.newdawn.slick.GameContainer, int)

keyPressed

public void keyPressed(int key,
                       char c)
Description copied from interface: KeyListener
Notification that a key was pressed

Specified by:
keyPressed in interface KeyListener
Overrides:
keyPressed in class BasicGame
Parameters:
key - The key code that was pressed (@see org.newdawn.slick.Input)
c - The character of the key that was pressed
See Also:
BasicGame.keyPressed(int, char)

keyReleased

public void keyReleased(int key,
                        char c)
Description copied from interface: KeyListener
Notification that a key was released

Specified by:
keyReleased in interface KeyListener
Overrides:
keyReleased in class BasicGame
Parameters:
key - The key code that was released (@see org.newdawn.slick.Input)
c - The character of the key that was released
See Also:
BasicGame.keyReleased(int, char)

main

public static void main(java.lang.String[] argv)
Entry point to our test

Parameters:
argv - The arguments passed to the test


Copyright © 2006 New Dawn Software. All Rights Reserved.