⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 instruction.java

📁 类似于推箱子的手机游戏源码
💻 JAVA
字号:
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;
/*
 * Instruction.java
 *
 * Created on 2007年10月21日, 下午9:18
 *
 * To change this template, choose Tools | Template Manager
 * and open the template in the editor.
 */

/**
 *
 * @author liang
 */
public class Instruction extends Form implements CommandListener{
    
    /** Creates a new instance of Instruction */
    private Hunt_Midlet midlet;
    private static final String intro = 
           "按上下左右键实现准心移动,\n"+
            "瞄准后按选择键实现射击,\n"+
            "打中兔子得5分\n"+
	    "打中小鸡得10分\n"+
            "打中鸟得20分\n"+
            "打中鸭子得15分\n"+
            "打中飞碟得30分\n"+
	    "打中野猪得10分\n"+
            "打中气球减5分\n"+
            "必须达到规定的分数即可过关\n"+
            "超过或达不到分数都结束游戏";
    Command back = new Command("后退",Command.BACK,1);
    
    public Instruction(Hunt_Midlet midlet) {
        super("游戏规则说明");
        append(new StringItem(null,intro));
        this.midlet = midlet;
        addCommand(back);
        setCommandListener(this);
    }

    public void commandAction(Command cmd, Displayable displayable) {
        if(cmd.getCommandType() == Command.BACK ){
             midlet.IntroBack();
        }
    }
    
}

⌨️ 快捷键说明

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