首先你打开 GameBuilder,创建精灵、平铺层和场景,现在我如何让它出现在模拟器的显示中?我尝试创建一个 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)
我能做些什么?也许是课堂上的错误?谢谢