Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ..
- public class Game extends Canvas implements Runnable {
- ..
- private WaterTile water;
- ..
- public Game() {
- ..
- water = new WaterTile(null);
- ..
- }
- ..
- public void run() {
- ..
- int updates = 0;
- requestFocus();
- while (running) {
- ..
- while (delta >= 1) {
- update();
- updates++;
- delta--;
- }
- ..
- }
- stop();
- }
- public void update() {
- ..
- water.update();
- }
- ..
- public static void main(String[] args) {
- Game game = new Game();
- ..
- game.start();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement