instruction.java
来自「j2me的坦克大战 元代码 单机版和蓝牙联网版」· Java 代码 · 共 29 行
JAVA
29 行
import javax.microedition.lcdui.Command;import javax.microedition.lcdui.CommandListener;import javax.microedition.lcdui.Displayable;import javax.microedition.lcdui.Form;import javax.microedition.lcdui.StringItem; public class Instruction extends Form implements CommandListener{ private GameMidlet gameMidlet; private Command cmdExit; public Instruction (GameMidlet gameMidlet) { super("Game Instruct"); this.gameMidlet = gameMidlet; cmdExit = new Command("Back",Command.EXIT,1); String instruc = " Your task is kill all enemy and protect your fort,press up down,left right to move your tank,press middle to fire."; StringItem item = new StringItem("GameInstruct",instruc); append(item); addCommand(cmdExit); this.setCommandListener(this); } public void commandAction(Command arg0, Displayable arg1) { if(arg0 == cmdExit) { gameMidlet.gameMenuCanvasBack(); } }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?