Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. private void render() //renders graphics
  2. {
  3. BufferStrategy bs = this.getBufferStrategy();
  4. if(bs == null)
  5. {
  6. this.createBufferStrategy(3);
  7. return;
  8. }
  9. Graphics g = bs.getDrawGraphics();
  10.  
  11. g.setColor(Color.BLACK);
  12. g.fillRect(0, 0,WIDTH, HEIGHT);
  13.  
  14. g.setFont(new Font("Dialog", Font.BOLD, 18)); //doesnt work
  15. g.drawString(Color.BLUE + "FPS: " + Color.ORANGE + frames, 50, 50);
  16.  
  17. handler.render(g);
  18. hud.render(g);
  19.  
  20. g.dispose();
  21. bs.show();
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement