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

📄 instructionsscreen.java

📁 是男人就撑20秒游戏j2me版
💻 JAVA
字号:
/*
 * InstructionsScreen.java
 *
 * Created on 2006年11月25日, 上午9:27
 *
 * 游戏说明类 -- 向玩家介绍游戏的操作规则、奖励规则。
 */

import javax.microedition.lcdui.*;
/**
 *
 * @author TOM
 */
public class InstructionsScreen extends Form implements CommandListener{
    private final ManMidlet midlet;
    private final Command backCommand;
    private static final String instructions=
            "按2、4、6、8键控制飞机方向躲避子弹,"+            
            "按键5使用炮弹摧毁飞机周围的子弹,"+
            "其他按键暂停游戏;"+
            "开始时拥有1枚炮弹,此后每10秒奖励1枚炮弹;"+            
            "得分=时间+炮弹数*3";
    
    /** Creates a new instance of InstructionsScreen */
    public InstructionsScreen(ManMidlet midlet) {
        super("游戏规则说明");
        this.midlet = midlet;
        append(new StringItem(null,instructions));
        backCommand = new Command("后退",Command.BACK, 1);
        addCommand(backCommand);
        setCommandListener(this);
    }
    
    public void commandAction(Command cmd, Displayable display){
        midlet.instructionBack();
    }    
}

⌨️ 快捷键说明

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