run.java

来自「Bamboo Dance, game for mobile device It」· Java 代码 · 共 29 行

JAVA
29
字号
import javax.microedition.lcdui.*;

public class Run implements Runnable {

  public Run(Canvas canvas) {
    stop = 0;
    sleepTime = 1000;
    mainscreen = canvas;
  }

  public void run() {
    do {
      while (stop != 0) {
        ;
      }
      try {
        Thread.sleep(300L);
      } catch (Exception exception) {
        return;
      }
      mainscreen.repaint(0, 0, 128, 128);
    } while (true);
  }

  Canvas mainscreen;
  int stop;
  int sleepTime;
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?