最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
J2ME小游戏-fly
时间:2022-07-02 17:46:03 编辑:袖梨 来源:一聚教程网
1、FlyMidlet.java
package fly;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;
/**
*
*
*
*
* @author not attributable
* @version 1.0
*/
public class FlyMidlet extends MIDlet {
Navigate ng;
public FlyMidlet() {
ng=Navigate.getInstance(this);
}
protected void startApp() {
System.out.println("startApp");
ng.display.setCurrent(ng.mc);
printInfo();
}
protected void pauseApp() {
System.out.println("pauseApp");
}
protected void destroyApp(boolean parm1) {
System.out.println("destroyApp");
Navigate.mc.stop();
MyGameCanvas.cleanJob();
Navigate.cleanJob();
}
private void printInfo(){
System.out.println("FlyMidlet printInfo() start:");
System.out.println("FlyMidlet printInfo() end:");
}
}
2、Bullets.java
package fly;
import javax.microedition.lcdui.game.*;
import javax.microedition.lcdui.*;
import java.util.Random;
/**
*
*
*
*
* @author not attributable
* @version 1.0
*/
public class Bullets extends GameObject {
private int[][] bullets;
private int bulletstotal;
private Random rnd;
public static final int BULLET_TYPE_LEFT=0;
public static final int BULLET_TYPE_RIGHT=1;
public static final int BULLET_TYPE_TOP=2;
public static final int BULLET_TYPE_BOTTOM=3;
private int width,height;
public Bullets(Image img,int picwidth,int picheight,int bulletstotal,int width,int height) {
package fly;
import javax.microedition.midlet.*;
import javax.microedition.lcdui.*;
import java.util.*;
/**
*
Title:
*
Description:
*
Copyright: Copyright (c) 2004
*
Company:
* @author not attributable
* @version 1.0
*/
public class FlyMidlet extends MIDlet {
Navigate ng;
public FlyMidlet() {
ng=Navigate.getInstance(this);
}
protected void startApp() {
System.out.println("startApp");
ng.display.setCurrent(ng.mc);
printInfo();
}
protected void pauseApp() {
System.out.println("pauseApp");
}
protected void destroyApp(boolean parm1) {
System.out.println("destroyApp");
Navigate.mc.stop();
MyGameCanvas.cleanJob();
Navigate.cleanJob();
}
private void printInfo(){
System.out.println("FlyMidlet printInfo() start:");
System.out.println("FlyMidlet printInfo() end:");
}
}
2、Bullets.java
package fly;
import javax.microedition.lcdui.game.*;
import javax.microedition.lcdui.*;
import java.util.Random;
/**
*
Title:
*
Description:
*
Copyright: Copyright (c) 2004
*
Company:
* @author not attributable
* @version 1.0
*/
public class Bullets extends GameObject {
private int[][] bullets;
private int bulletstotal;
private Random rnd;
public static final int BULLET_TYPE_LEFT=0;
public static final int BULLET_TYPE_RIGHT=1;
public static final int BULLET_TYPE_TOP=2;
public static final int BULLET_TYPE_BOTTOM=3;
private int width,height;
public Bullets(Image img,int picwidth,int picheight,int bulletstotal,int width,int height) {
相关文章
- 《潜行者2:切尔诺贝利之心》借刀杀人成就攻略分享 11-21
- 《潜行者2:切尔诺贝利之心》游戏保存方法介绍 11-21
- 《潜行者2:切尔诺贝利之心》游戏支线任务作用介绍 11-21
- 《潜行者2:切尔诺贝利之心》异常现象特点介绍 11-21
- 《潜行者2:切尔诺贝利之心》随机事件避免原因介绍 11-21
- 《潜行者2:切尔诺贝利之心》随机事件应对方法推荐 11-21