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

📄 battle_on_the_river_kwai_n60.java

📁 J2ME War game Thank you very much.
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                if (gameend == 1) {
                    gameend = 0;
                }
                display.setCurrent(obj);
                break;

            case 12:
                g.setColor(0, 0, 0);
                g.fillRect(0, 0, w, h);
                g.setColor(255, 255, 255);
                drawbg(g, false);
                g.drawString("Level " + (level) + " Completed.", w / 2,
                             h / 2 - 20, Graphics.TOP | Graphics.HCENTER);
                g.drawString("Score: " + score, w / 2, h / 2 + 10,
                             Graphics.TOP | Graphics.HCENTER);

                break;
            case 13:
                g.setColor(0, 0, 0);
                g.fillRect(0, 0, w, h);
                drawbg(g, false);
                g.setColor(255, 255, 255);
                g.drawString("Loading level " + (level + 1), w / 2, 40,
                             Graphics.TOP | Graphics.HCENTER);
                fire = 0;
                if (gc % 3 == 0) {
                    count++;
                }
                if (count > 20) {
                    fire = 1;
                    for (int i = 0; i < t.length; i++) {
                        if (t[i] != null) {
                            t[i] = null;
                        }
                    }
                }
                g.setColor(0xffcc00);
                g.drawRect(37, 195, 101, 8);
                g.setColor(255, 255, 255);
                g.fillRect(38, 196, count * 5, 8);
                break;

            case 14:
                g.setColor(0, 0, 0);
                g.fillRect(0, 0, w, h);
                g.setColor(255, 255, 255);
                g.setFont(Font.getFont(Font.FACE_SYSTEM, Font.STYLE_PLAIN,
                                       Font.SIZE_SMALL));
                g.drawString("Submit your score to", w / 2, 60,
                             Graphics.TOP | Graphics.HCENTER);
                g.drawString("compete with gamers ", w / 2, 75,
                             Graphics.TOP | Graphics.HCENTER);
                g.drawString("all round the globe.", w / 2, 90,
                             Graphics.TOP | Graphics.HCENTER);
                g.drawString("(This feature will", w / 2, 105,
                             Graphics.TOP | Graphics.HCENTER);
                g.drawString("depend on carrier ", w / 2, 120,
                             Graphics.TOP | Graphics.HCENTER);
                g.drawString("networks and handset ", w / 2, 135,
                             Graphics.TOP | Graphics.HCENTER);
                g.drawString("compatibility.)", w / 2, 150,
                             Graphics.TOP | Graphics.HCENTER);

                g.drawString("Yes", 11, 180, Graphics.TOP | Graphics.LEFT);
                g.drawString("No", w - 11, 180, Graphics.TOP | Graphics.RIGHT);

                break;

            case 17:
                g.setColor(0, 0, 0);
                g.fillRect(0, 0, w, h);
                drawbg(g, false);
                g.setColor(255, 255, 0);
                g.setFont(Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD,
                                       Font.SIZE_MEDIUM));
                g.drawString("More Games", w / 2, start,
                             Graphics.TOP | Graphics.HCENTER);
                g.setColor(255, 255, 255);
                g.setFont(Font.getFont(Font.FACE_SYSTEM, Font.STYLE_BOLD,
                                       Font.SIZE_SMALL));
                nkpr = Menu.drawtext(g, MoreGames, tmp[2], w, h, start, endp,
                                     fs, x1, y1, tdif, lpp);
                g.setClip(0, 0, w, h);
                if (nkpr != 1) {
                    if (nkpr != 2) {
                        drtrng(dg, w / 2, start + fs + 3, 6, 0);
                    }
                    if (nkpr != 8) {
                        drtrng(dg, w / 2, init + endp + 1, 6, 180);
                    }
                }
                break;
            case 18: //choice level
                g.drawImage(bbg2, 0, 0, Graphics.TOP | Graphics.LEFT);

                for (int i = 0; i < showlevel.length; i++) {
                    if (i == (no - 1)) {
                        g.drawImage(btns3, w / 2, h / 3 + (i * 25),
                                    Graphics.TOP | Graphics.HCENTER);
                        g.setFont(Font.getFont(Font.FACE_SYSTEM,
                                               Font.STYLE_BOLD, Font.SIZE_SMALL));
                        g.setColor(255, 255, 255);
                        g.drawString(showlevel[i], w / 2, h / 3 + 4 + (i * 25),
                                     Graphics.TOP | Graphics.HCENTER);
                    } else {
                        g.drawImage(btns2, w / 2, h / 3 + (i * 25),
                                    Graphics.TOP | Graphics.HCENTER);
                        g.setFont(Font.getFont(Font.FACE_SYSTEM,
                                               Font.STYLE_BOLD, Font.SIZE_SMALL));
                        g.setColor(60, 60, 60);
                        g.drawString(showlevel[i], w / 2, h / 3 + 4 + (i * 25),
                                     Graphics.TOP | Graphics.HCENTER);
                    }
                }

                /*
                      g.setColor(0,0,0);

                      g.fillRect(20,h-14-2,w-40,15);
                      if(gc%3!=0)
                      {
                       drtrng(dg,20,h-14,6,90);
                       drtrng(dg,w-20,h-14,6,270);
                 }
                    Menu.drawHmenu(g,Lvmenu,w/2,h-14,no);
                 */
//				 System.out.println("paint a =18");
                break;

            }
//--------------------------------------------------------
        }

        public void scroll1() {
            gc++;
            if (gc > 1000) {
                gc = 0;
            }

            if (fire == 1 && j == 5) {
                switch (a) {
                case 1:
                    a = 2;
                    fire = 0;
                    break;
                case 2:
                    kpr = false;
                    tdif = 0;
                    nkpr = 0;
                    Menu.inittext();
                    switch (no) {
                    case 1:
                        if (cl < 2) {
                            if (gameend != 1 && game == 1) {
                                a = 10;
                                fire = 0;
                                no = 1;
                            } else {
                                a = 18;
                                IN_Game = true;
                                fire = 0;
                                PlayAgain(1);
                                no = 1;
                                //initpara();
                            }
                            y1 = init;
                            inc = 1;
                            cntri = 1;
                            cntrj = 1;
                        } else {
                            if (gameend != 1 && game == 1) {
                                a = 10;
                                fire = 0;
                                no = 1;
                            } else {
                                fire = 0;
                                a = 18;
                                no = 1;
                            }
                        }
                        break;

                    case 2:
                        a = 4;
                        fire = 0;
                        y1 = init;
                        inc = 1;
                        cntri = 1;
                        cntrj = 1;

                        //a=3;fire=0;y1=init;inc=1;cntri=1;cntrj=1;

                        break;
                    case 3:
                        if (sound == 0) {
                            sound = 1;
                            fire = 0;
                        } else if (sound == 1) {
                            sound = 0;
                            fire = 0;
                        }

                        break;

                    case 4:

                        /*
                                          if(sound==0){sound=1;fire=0;}
                               else if(sound==1){sound=0;fire=0;}*/
                        a = 5;
                        fire = 0;
                        y1 = init;
                        inc = 1;
                        cntri = 1;
                        cntrj = 1;
                        break;

                    case 5:
                        a = 6;
                        fire = 0;
                        y1 = init;
                        inc = 1;
                        cntri = 1;
                        cntrj = 1;
                        break;

                    case 6:
                        a = 7;
                        fire = 0;
                        y1 = init;
                        inc = 1;
                        cntri = 1;
                        cntrj = 1;
                        break;

                    case 7:
                        a = 8;
                        destroyApp(false);
                        notifyDestroyed();
                        break;

                    }
                    break;

                case 9:

                    //     initintro();
                    //if(cl<2){
                    switch (no) {
                    case 1:
                        a = 10;
                        fire = 0;
                        no = 1;
                        game = 1;
                        gameend = 0;
                        break;
                    case 2:
                        if (cl < 2) {
                            a = 10;
                            fire = 0;
                            game = 0;
                            gameend = 1;
                            initpara();
                            PlayAgain(1);
                        } else {
                            a = 18;
                            fire = 0;
                            game = 0;
                            gameend = 1;
                            no = 1;
                        }

                        break;
                    case 3:
                        a = 2;
                        fire = 0;
                        no = 1;
                        game = 1;
                        gameend = 0;
                        break;
                    }

                    // }
                    //	 else {
                    fire = 0;

                    // 	a = 18;
                    // }
                    break;
                case 12:
                    a = 13;
                    fire = 0;
                    no = 1;
                    break;
                case 13:
                    if (count >= 20) {
                        a = 10;
                        fire = 0;
                        no = 1;
                        count = 0;
                    }
                    break;

                case 11:
                    a = 88;
                    fire = 0;
                    break;
                case 88:
                    a = 14;
                    fire = 0;
                    y1 = init;
                    inc = 1;
                    cntri = 1;
                    cntrj = 1;

                    break;
                case 18: //choice level
                    if (cl > no) {

                    }
                    switch (no) {
                    case 1:

                        init_all_var(1);
                        a = 10;
                        fire = 0;
                        game = 1;

⌨️ 快捷键说明

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