Saltar al contenido principal

240x320: Symbian Games

protected void paint(Graphics g) Graphics.LEFT);

public GameCanvas() width = 240; height = 320; catcherX = width/2 - CATCHER_W/2; catcherY = height - 40; ballX = width/2; ballY = 20; score = 0; symbian games 240x320

public void start() running = true; gameThread = new Thread(this); gameThread.start(); protected void paint(Graphics g) Graphics

public void commandAction(Command c, Displayable d) if (c == exitCommand) destroyApp(true); notifyDestroyed(); protected void paint(Graphics g) Graphics.LEFT)

class GameCanvas extends Canvas implements Runnable { private boolean running; private int catcherX, catcherY; private int ballX, ballY; private int score; private int width, height; private Thread gameThread;

}

public void run() { while (running) { repaint(); updateGame(); try Thread.sleep(30); catch (Exception e) {} } }