|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.BasicGame
org.newdawn.slick.tests.MusicListenerTest
public class MusicListenerTest
A test for music listeners which notify you when the music has eneded
| Field Summary |
|---|
| Fields inherited from class org.newdawn.slick.BasicGame |
|---|
controllerButton, controllerDown, controllerLeft, controllerRight, controllerUp |
| Constructor Summary | |
|---|---|
MusicListenerTest()
Create a new test |
|
| Method Summary | |
|---|---|
void |
init(GameContainer container)
Initialise the game. |
void |
keyPressed(int key,
char c)
Notification that a key was pressed |
static void |
main(java.lang.String[] argv)
Entry point to the sound test |
void |
musicEnded(Music music)
Notification that a piece of music finished playing |
void |
musicSwapped(Music music,
Music newMusic)
Notification that a piece of music has been swapped for another. |
void |
render(GameContainer container,
Graphics g)
Render the game's screen here. |
void |
update(GameContainer container,
int delta)
Update the game logic here. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MusicListenerTest()
| Method Detail |
|---|
public void init(GameContainer container)
throws SlickException
Game
init in interface Gameinit in class BasicGamecontainer - The container holding the game
SlickException - Throw to indicate an internal errorBasicGame.init(org.newdawn.slick.GameContainer)
public void update(GameContainer container,
int delta)
throws SlickException
Game
update in interface Gameupdate in class BasicGamecontainer - The container holing this gamedelta - The amount of time thats passed since last update in milliseconds
SlickException - Throw to indicate an internal errorBasicGame.update(org.newdawn.slick.GameContainer, int)public void musicEnded(Music music)
MusicListener
musicEnded in interface MusicListenermusic - The music that finished playingMusicListener.musicEnded(org.newdawn.slick.Music)
public void musicSwapped(Music music,
Music newMusic)
MusicListener
musicSwapped in interface MusicListenermusic - The music that has been swapped outnewMusic - The new music we're playingMusicListener.musicSwapped(org.newdawn.slick.Music, org.newdawn.slick.Music)
public void render(GameContainer container,
Graphics g)
throws SlickException
Game
render in interface Gamecontainer - The container holing this gameg - The graphics context that can be used to render. However, normal rendering
routines can also be used.
SlickException - Throw to indicate a internal errorGame.render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
public void keyPressed(int key,
char c)
KeyListener
keyPressed in interface KeyListenerkeyPressed in class BasicGamekey - The key code that was pressed (@see org.newdawn.slick.Input)c - The character of the key that was pressedBasicGame.keyPressed(int, char)public static void main(java.lang.String[] argv)
argv - The arguments provided to the test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||