1

まず、GameBuilder を開き、スプライト、Tiled Layers、およびシーンを作成します。エミュレーターのディスプレイに表示するにはどうすればよいですか? VisualMIDlet を作成して、このコードを挿入しようとしました public void startApp() throws MIDletStateChangeException {

  try {
  display = Display.getDisplay(this);
  GameDesign gameCanvas = new GameDesign();
  gameCanvas.start();
  Display.setCurrent(gameCanvas);

}
catch (Exception ex) {
  System.out.println(ex);
}
}

ただし、 Display.setCurrent(gameCanvas); の行にあります。プログラムはエラーを生成します

  Display.setCurrent(gameCanvas);
method Display.setCurrent(Displayable) is not applicable
  (actual argument GameDesign cannot be converted to Displayable by method invocation conversion)
method Display.setCurrent(Alert,Displayable) is not applicable
  (actual and formal argument lists differ in length)

私に何ができる?おそらくクラスのエラーですか?ありがとう

4

0 に答える 0