|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.BasicGame org.newdawn.slick.tests.NavMeshTest
public class NavMeshTest
A test to show nav-mesh generation on tile based maps.
Field Summary |
---|
Fields inherited from class org.newdawn.slick.BasicGame |
---|
controllerButton, controllerDown, controllerLeft, controllerRight, controllerUp |
Constructor Summary | |
---|---|
NavMeshTest()
Create a new test |
Method Summary | |
---|---|
Mover |
getMover()
Get the object being moved along the path if any |
int |
getSearchDistance()
Get the distance that has been searched to reach this point |
int |
getSourceX()
Get the x coordinate of the source location |
int |
getSourceY()
Get the y coordinate of the source location |
void |
init(GameContainer container)
Initialise resources and the map data |
static void |
main(java.lang.String[] argv)
Entry point to out application |
void |
mousePressed(int button,
int x,
int y)
Notification that a mouse button was pressed |
void |
render(GameContainer container,
Graphics g)
Render the game - in this case render the map and diagnostic data |
void |
update(GameContainer container,
int delta)
Update data map etc |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NavMeshTest()
Method Detail |
---|
public void init(GameContainer container) throws SlickException
init
in interface Game
init
in class BasicGame
container
- the container the game is running in
SlickException
- Throw to indicate an internal errorGame.init(org.newdawn.slick.GameContainer)
public void update(GameContainer container, int delta) throws SlickException
update
in interface Game
update
in class BasicGame
container
- The container holing this gamedelta
- The amount of time thats passed since last update in milliseconds
SlickException
- Throw to indicate an internal errorGame.update(org.newdawn.slick.GameContainer, int)
public void render(GameContainer container, Graphics g) throws SlickException
render
in interface Game
container
- The container we're running the game ing
- The graphics context on which to render
SlickException
- Throw to indicate a internal errorpublic Mover getMover()
PathFindingContext
getMover
in interface PathFindingContext
public int getSearchDistance()
PathFindingContext
getSearchDistance
in interface PathFindingContext
public int getSourceX()
PathFindingContext
getSourceX
in interface PathFindingContext
public int getSourceY()
PathFindingContext
getSourceY
in interface PathFindingContext
public void mousePressed(int button, int x, int y)
MouseListener
mousePressed
in interface MouseListener
mousePressed
in class BasicGame
button
- The index of the button (starting at 0)x
- The x position of the mouse when the button was pressedy
- The y position of the mouse when the button was pressedMouseListener.mousePressed(int, int, int)
public static void main(java.lang.String[] argv)
argv
- The arguments passed to the application
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |