moonlight.zip

  • PUDN用户
    了解作者
  • Java
    开发工具
  • 116KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • 1 积分
    下载积分
  • 9
    下载次数
  • 2010-04-13 01:45
    上传日期
月光 一个j2me的游戏,具备了java手机游戏的各种知识
moonlight.zip
  • moonlight
  • bin
  • moonlight.jad
    232B
  • MANIFEST.MF
    181B
  • res
  • bomb2.png
    387B
  • icon1.png
    212B
  • bomb0.png
    284B
  • eshot5.png
    215B
  • bomb1.png
    362B
  • z3.png
    295B
  • eshot4.png
    202B
  • eshot6.png
    265B
  • z5.png
    836B
  • eshot0.png
    233B
  • eye0.png
    290B
  • z0.png
    309B
  • eshot1.png
    252B
  • star0.png
    110B
  • tboss2
    6.3KB
  • tboss1
    5.8KB
  • tshot
    4.4KB
  • z4.png
    393B
  • z6.png
    770B
  • title.png
    2.1KB
  • icon0.png
    268B
  • face1.png
    810B
  • z1.png
    304B
  • eshot9.png
    205B
  • eshot2.png
    240B
  • star2.png
    110B
  • star1.png
    110B
  • eshot8.png
    225B
  • eshot3.png
    240B
  • z2.png
    302B
  • eshot7.png
    227B
  • icon3.png
    182B
  • face0.png
    876B
  • star3.png
    110B
  • jiki.png
    304B
  • eye1.png
    214B
  • moonlight.png
    349B
  • bomb3.png
    378B
  • icon2.png
    237B
  • classes
  • MainCanvas.class
    78.5KB
  • moonlight.class
    1023B
  • lib
  • tmpclasses
  • MainCanvas.class
    65.4KB
  • moonlight.class
    1023B
  • src
  • moonlight.java
    721B
  • MainCanvas.java
    194.4KB
  • tmplib
  • project.properties
    119B
内容介绍
import java.io.*; import java.util.Random; import javax.microedition.lcdui.*; import javax.microedition.midlet.MIDlet; import javax.microedition.rms.RecordStore; // download by http://www.codefans.net public class MainCanvas extends Canvas implements Runnable, CommandListener { static int MainFlag = 0; static int ThreadSpeed = 100; static int ReadCount = 0; static int ik = 0; static int gk = 0; static boolean FlgSoftKey1 = false; static boolean FlgSoftKey2 = false; static boolean FlgPushDecide = false; static boolean FlgPushUp = false; static boolean FlgPushDown = false; static boolean FlgPushLeft = false; static boolean FlgPushRight = false; static int LogoCount = 0; static int TitleCount = 0; static int ClearWait = 0; static int Cursor = 0; static int BackMain = 0; static String StrHelpMenu[] = null; InputStream is; public static Command toggleCommand; public static Command exitCommand; static String SoftMess1 = ""; static String SoftMess2 = ""; RecordStore rs; static int rsId = 0; static Image offImage = null; static Graphics offGfx = null; static Image imgTitle; static Image imgMyShip; static Image imgIcon[] = new Image[4]; static Image imgFace[] = new Image[2]; static Image imgEye[] = new Image[2]; static Image imgEnemy[] = new Image[7]; static Image imgBoss[] = new Image[22]; static Image imgMyShot[] = new Image[15]; static Image imgEShot[] = new Image[10]; static Image imgBomb[] = new Image[4]; static Image imgStar[] = new Image[4]; static boolean PlayerAlive = true; static int PlayerBomb = 0; static int PlayerX; static int PlayerY; static int PlayerXSp; static int PlayerYSp; static int PAttackMode; static int PAttackMain; static int Muteki = 0; static int MySpecialCount = 0; static int MyChar; static int ShotWait; static int AnimMyLazer; static int MyLazerLength; static boolean MyShotAlive[] = new boolean[30]; static int MyShotType[] = new int[30]; static int MyShotX[] = new int[30]; static int MyShotY[] = new int[30]; static int MyShotMX[] = new int[30]; static int MyShotMY[] = new int[30]; static int EnemyWait; static int EnemyType[] = new int[20]; static boolean EnemyAlive[] = new boolean[20]; static int EnemyLife[] = new int[20]; static int EnemyX[] = new int[20]; static int EnemyY[] = new int[20]; static int EnemyXSize[] = new int[20]; static int EnemyYSize[] = new int[20]; static int EnemyFlag1[] = new int[20]; static int EnemyFlag2[] = new int[20]; static int EnemyBomb[] = new int[20]; static int EnemyPoint[] = new int[20]; static int BossWait = 0; static int BossType[] = new int[5]; static boolean BossAlive[] = new boolean[5]; static boolean BossDamage[] = new boolean[5]; static int BossMaxLife = 0; static int BossLife[] = new int[5]; static int BossX[] = new int[5]; static int BossY[] = new int[5]; static int BossXSize[] = new int[5]; static int BossYSize[] = new int[5]; static int BossFlag1[] = new int[5]; static int BossFlag2[] = new int[5]; static int BossFlag3[] = new int[5]; static int BossFlag4[] = new int[5]; static int BossBomb[] = new int[5]; static int BossPoint[] = new int[5]; static boolean BossTarget; static int BossTargetX; static int BossTargetY; static boolean EShotAlive[] = new boolean[100]; static int EShotType[] = new int[100]; static int EShotX[] = new int[100]; static int EShotY[] = new int[100]; static int EShotMX[] = new int[100]; static int EShotMY[] = new int[100]; static int EShotFlag[] = new int[100]; static int StarType[] = new int[10]; static int StarX[] = new int[10]; static int StarY[] = new int[10]; static int EncountType[] = new int[5]; static int EncountNumber = 0; static boolean FlgOption[] = new boolean[3]; static int Round = 1; static int Stage = 1; static int Score = 0; static int HiScore = 0; static int ExtendPoint = 0; static int BonusTotal = 0; static int BonusPoint = 0; static int BonusEnemy = 0; static int BonusEscape = 0; static int Rest = 3; static int MyLife = 5; static boolean GameClear = false; static boolean FlgGameOver = false; static int FlgBoss = 0; static int MapScroll = 0; static int StartCount = 0; static int ExtendCount = 0; static int OverCount = 0; static int HelpPage = 0; static int Path[] = new int[2]; public MainCanvas(Display display1, moonlight moonlight1) { display = null; thread = null; god = new Random(); SCREEN_WH = SCREEN_W / 2; is = null; rs = null; boolean flag = false; app = moonlight1; display = display1; try { boolean flag1 = false; Object obj = null; Object obj1 = null; } catch(Exception exception) { } offImage = Image.createImage(SCREEN_W, SCREEN_H); offGfx = offImage.getGraphics(); DataLoad(); for(int i = 0; i < FlgOption.length; i++) FlgOption[i] = true; thread = new Thread(this); thread.start(); SetSoftKey(); } public void paint(Graphics g) { Graphics g1 = g; g = offGfx; offGfx = g1; } public void run() { long l = 0L; do { try { Thread.yield(); try { if(System.currentTimeMillis() - l >= (long)ThreadSpeed) { l = System.currentTimeMillis(); AutoEvent(); ScanKey(); DrawGraphic(); repaint(); System.gc(); } } catch(Exception exception) { } } catch(Exception exception1) { return; } } while(true); } public void commandAction(Command command, Displayable displayable) { } public void AutoEvent() { boolean flag = false; boolean flag1 = false; switch(MainFlag) { case 2: // '\002' case 3: // '\003' case 4: // '\004' case 5: // '\005' case 6: // '\006' case 9: // '\t' case 10: // '\n' case 11: // '\013' case 12: // '\f' default: break; case 0: // '\0' try { Object obj = null; if(ReadCount != 0) if(ReadCount >= 1 && ReadCount < 16) { if(ReadCount == 1) is = getClass().getResourceAsStream("tshot"); int i = ReadCount - 1; byte abyte0[] = new byte[SHOT_SIZE[i]]; is.read(abyte0); imgMyShot[i] = Image.createImage(abyte0, 0, abyte0.length); abyte0 = null; System.gc(); if(ReadCount == 15) is.close(); } else { imgTitle = Image.createImage("/title.png"); imgMyShip = Image.createImage("/jiki.png"); for(int i10 = 0; i10 < 4; i10++) imgIcon[i10] = Image.c
评论
    相关推荐
    • moonlight.rar
      J2me月光战机游戏源码,运行于手机的一款飞机游戏,经险刺激,源代码编译时最好去下载Sun官方最新的 Java Wireless Toolkit 2.3 以上版本,以避免JDK1.50和WTK2.1的冲突问题。
    • moonlight.rar
      J2me月光战机游戏源码,运行于手机的一款飞机游戏,经险刺激,源代码编译时最好去下载Sun官方最新的 Java Wireless Toolkit 2.3 以上版本,以避免JDK1.50和WTK2.1的冲突问题。
    • Aircraft-war.rar
      手机公司甚至开发了专门的游戏手机,因此手机游戏也将是一个新的服务性领域。本游戏对手机游戏的硬件要求比较简单,所以广大的手机用户基本上都可以下载来玩。 按5键打的子弹比较厉害,一般的话会自动打子弹的,...
    • ZxingDemo.rar
      android上使用ZXing识别条形码和二维码,代码简单易懂,相信能帮助读者迅速掌握相关的开发
    • android-order-system.rar
      基于Java的android点餐系统--android手机点餐系统,实现基本点菜功能,供大家参考学习
    • MTK-MT6235-USB-driver-2009082823351054.rar
      MTK 6235 USB driver for Nokia N97
    • Mine.zip
      Android 扫雷游戏源代码,代码中附加了详细的注释,另附加Ophone游戏开发文档,有详细搭建开发环境过程,与开发Android类似
    • J2ME_(chinese)api.rar
      J2ME 中文api以及应用 J2ME 中文api以及应用
    • Gallery3D.rar
      安卓系统原生的3D图片浏览器源代码,有兴趣的可以研究一下
    • wpctsc.rar
      wpctsc.exe for windows mobile 可以使WM手机远程登入PC