Advertisement
Guest User

Untitled

a guest
Apr 27th, 2013
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.92 KB | None | 0 0
  1. package first;
  2.  
  3. import org.newdawn.slick.*;
  4. public class This extends BasicGame
  5. {
  6. static boolean haha = false;
  7. int timeelapsed = 0;
  8.  
  9. public This()
  10. {
  11. super("Not really.");
  12. }
  13.  
  14. @Override
  15. public void init(GameContainer gc) throws SlickException
  16. {
  17.  
  18. }
  19.  
  20. @Override
  21. public void update(GameContainer gc, int delta) throws SlickException
  22. {
  23. timeelapsed += delta;
  24. if (timeelapsed >= 5000){
  25. haha = true;
  26. timeelapsed = 0;
  27. }
  28. }
  29.  
  30. @Override
  31. public void render(GameContainer gc, Graphics g) throws SlickException
  32. {
  33. g.setBackground(Color.white);
  34. g.setColor(Color.black);
  35. if (haha)
  36. g.drawString("This is not the Game you are looking for", 100, 100);
  37. }
  38.  
  39. public static void main(String[] args) throws SlickException
  40. {
  41. AppGameContainer app = new AppGameContainer(new This());
  42. app.setDisplayMode(800, 600, false);
  43. app.start();
  44. }
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement