Advertisement
Guest User

Game

a guest
Jun 29th, 2013
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.58 KB | None | 0 0
  1. ..
  2. public class Game extends Canvas implements Runnable {
  3.         ..
  4.     private WaterTile water;
  5.  
  6.     ..
  7.         public Game() {
  8.       ..
  9.       water = new WaterTile(null);
  10.       ..
  11.     }
  12.  
  13.         ..
  14.     public void run() {
  15.         ..
  16.         int updates = 0;
  17.         requestFocus();
  18.         while (running) {
  19.             ..
  20.             while (delta >= 1) {
  21.                 update();
  22.                 updates++;
  23.                 delta--;
  24.             }
  25.                         ..
  26.         }
  27.         stop();
  28.     }
  29.  
  30.     public void update() {
  31.         ..
  32.         water.update();
  33.     }
  34.  
  35.     ..
  36.     public static void main(String[] args) {
  37.         Game game = new Game();
  38.            ..
  39.         game.start();
  40.     }
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement