最新下载
热门教程
- 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) {
相关文章
- 《无限暖暖》围巾蚯蚓具体作用介绍 12-24
- 《无限暖暖》星夜守望连衣裙获得方法介绍 12-24
- 《无限暖暖》魔物试炼幻境解锁方法介绍 12-24
- 《无限暖暖》磐岩晶石获得方法介绍 12-24
- 《无限暖暖》巨石岩仔打法攻略分享 12-24
- 《无限暖暖》布布果在哪 12-24