org.jbox2d.integrations.slick
Class SlickTestMain

java.lang.Object
  extended by org.newdawn.slick.BasicGame
      extended by org.jbox2d.integrations.slick.SlickTestMain
All Implemented Interfaces:
org.newdawn.slick.Game, org.newdawn.slick.InputListener

public class SlickTestMain
extends org.newdawn.slick.BasicGame

A bare-bones Slick implementation of the Pyramid demo. Just enough to get to the drawing - no input handling of any sort, and only very basic camera handling.

Should get you on your way, though.

Author:
ewjordan

Field Summary
 SlickDebugDraw m_debugDraw
           
 
Fields inherited from class org.newdawn.slick.BasicGame
controllerButton, controllerDown, controllerLeft, controllerRight, controllerUp
 
Constructor Summary
SlickTestMain()
           
 
Method Summary
 void boundaryViolated(Body b)
           
 void create()
           
 void createWorld()
          Override this if you need to create a different world AABB or gravity vector
 void init(org.newdawn.slick.GameContainer container)
           
 void jointDestroyed(Joint j)
           
static void main(java.lang.String[] args)
           
 void render(org.newdawn.slick.GameContainer container, org.newdawn.slick.Graphics g)
           
 void step()
          Take a physics step.
 void update(org.newdawn.slick.GameContainer container, int delta)
           
 
Methods inherited from class org.newdawn.slick.BasicGame
closeRequested, controllerButtonPressed, controllerButtonReleased, controllerDownPressed, controllerDownReleased, controllerLeftPressed, controllerLeftReleased, controllerRightPressed, controllerRightReleased, controllerUpPressed, controllerUpReleased, getTitle, inputEnded, isAcceptingInput, keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheelMoved, setInput
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_debugDraw

public SlickDebugDraw m_debugDraw
Constructor Detail

SlickTestMain

public SlickTestMain()
Method Detail

main

public static void main(java.lang.String[] args)

init

public void init(org.newdawn.slick.GameContainer container)
          throws org.newdawn.slick.SlickException
Specified by:
init in interface org.newdawn.slick.Game
Specified by:
init in class org.newdawn.slick.BasicGame
Throws:
org.newdawn.slick.SlickException

update

public void update(org.newdawn.slick.GameContainer container,
                   int delta)
            throws org.newdawn.slick.SlickException
Specified by:
update in interface org.newdawn.slick.Game
Specified by:
update in class org.newdawn.slick.BasicGame
Throws:
org.newdawn.slick.SlickException

render

public void render(org.newdawn.slick.GameContainer container,
                   org.newdawn.slick.Graphics g)
            throws org.newdawn.slick.SlickException
Throws:
org.newdawn.slick.SlickException

createWorld

public void createWorld()
Override this if you need to create a different world AABB or gravity vector


create

public void create()

step

public void step()
Take a physics step. This is the guts of the simulation loop. When creating your own game, the most important thing to have in your step method is the m_world.step() call.


boundaryViolated

public void boundaryViolated(Body b)

jointDestroyed

public void jointDestroyed(Joint j)