gameabout.java

来自「一个基于JAVA的手机射击类游戏``有过关模式」· Java 代码 · 共 49 行

JAVA
49
字号
package jsky;
import java.io.IOException;

import javax.microedition.lcdui.*;
import javax.microedition.lcdui.game.*;
public class GameAbout extends Form implements CommandListener{
	
	private Display display;
	private Dragon dragon;
	private Command aboutCanvasCmd;
	private ImageItem aboutTextImage;
	public static Thread aboutThread = null;
	
	public GameAbout(Dragon dragon){
		super("ABOUT");
		System.out.println("***********");
		this.dragon = dragon;
		//this.display = display;
		Image textImage = null;
		try {
			textImage = Image.createImage("/img/system/aboutText.png");
			System.out.println(">>>>>>>>>>>>>>>>2222");
		} catch (IOException ioe) {
			append("unable to load image");
			System.err.println("AboutCanvas pic error");
		}
		System.out.println("****************1111");
		aboutTextImage = new ImageItem(null, textImage,
				ImageItem.LAYOUT_CENTER, null);
		System.out.println("***************333");
		append(aboutTextImage);
		System.out.println("********************4444");
		//dragon = new Dragon();
		System.out.println("**********************85555");
		aboutCanvasCmd = new Command("BACK",Command.BACK,1);
		addCommand(aboutCanvasCmd);
		setCommandListener(this);
		System.out.println("******************2222");
	}
	
	public void commandAction(Command cmd,Displayable dis){
		if(cmd == aboutCanvasCmd){
			dragon.backToMenu();
		}
	}
	
	
}

⌨️ 快捷键说明

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