teaowl

Slick2D Streaming Test

Sep 17th, 2021 (edited)
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 1.02 KB | None | 0 0
  1. package test;
  2.  
  3. import org.newdawn.slick.AppGameContainer;
  4. import org.newdawn.slick.BasicGame;
  5. import org.newdawn.slick.GameContainer;
  6. import org.newdawn.slick.Graphics;
  7. import org.newdawn.slick.Music;
  8. import org.newdawn.slick.SlickException;
  9.  
  10. public class launcher extends BasicGame {
  11.  
  12.     Music music;
  13.    
  14.     public launcher(String title) {
  15.         super(title);
  16.     }
  17.  
  18.     public static void main(String[] args) throws SlickException {
  19.         BasicGame game = new launcher("OGG Streaming Test");
  20.         AppGameContainer container = new AppGameContainer(game);
  21.         container.start();
  22.     }
  23.  
  24.     @Override
  25.     public void init(GameContainer container) throws SlickException {
  26.             music = new Music("res/flashback4.ogg", true);
  27.             music.play();
  28.     }
  29.  
  30.     // needed by Basic Game interface
  31.     @Override
  32.     public void render(GameContainer container, Graphics g) throws SlickException {
  33.     }
  34.  
  35.     // needed by Basic Game interface
  36.     @Override
  37.     public void update(GameContainer container, int delta) throws SlickException {
  38.     }
  39.    
  40. }
  41.  
Add Comment
Please, Sign In to add comment