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

📄 smugglersingh.java

📁 一款探险性的j2me游戏,自由部署在eclipse,netbeas.
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
                        {
                            comment = "You only have " + buy[iy] + " unit(s).";
                            inp = 0;
                            count = 0;
                            xx = 85;
                        }
                }
                if((scene == 4 || scene == 5) && count < 2)
                {
                    if(i == 48)
                    {
                        count++;
                        xx += 8;
                        in[count] = 0;
                    }
                    if(i == 49)
                    {
                        count++;
                        xx += 8;
                        in[count] = 1;
                    }
                    if(i == 50)
                    {
                        count++;
                        xx += 8;
                        in[count] = 2;
                    }
                    if(i == 51)
                    {
                        count++;
                        xx += 8;
                        in[count] = 3;
                    }
                    if(i == 52)
                    {
                        count++;
                        xx += 8;
                        in[count] = 4;
                    }
                    if(i == 53)
                    {
                        count++;
                        xx += 8;
                        in[count] = 5;
                    }
                    if(i == 54)
                    {
                        count++;
                        xx += 8;
                        in[count] = 6;
                    }
                    if(i == 55)
                    {
                        count++;
                        xx += 8;
                        in[count] = 7;
                    }
                    if(i == 56)
                    {
                        count++;
                        xx += 8;
                        in[count] = 8;
                    }
                    if(i == 57)
                    {
                        count++;
                        xx += 8;
                        in[count] = 9;
                    }
                }
                if(i == 42 && count > 0)
                {
                    count--;
                    xx -= 8;
                }
            }
        }

        public void scroll11()
        {
            if(gamePaint == 2)
                repaint();
        }

        public buysell()
        {
            a = 20;
        }
    }

    public class Intro extends FullCanvas
    {

        public void paint(Graphics g)
        {
            DirectGraphics directgraphics = DirectUtils.getDirectGraphics(g);
            cnt++;
            if(a == 0)
            {
                g.drawImage(load, 0, 0, 20);
                g.setColor(255, 255, 0);
                g.drawRect(38, 193, 107, 10);
                g.setColor(255, 0, 0);
                g.fillRect(39, 194, 105, 8);
                g.setColor(0, 0, 0);
                g.fillRect(39, 194, cnt * 5, 8);
                if(cnt >= 20)
                {
                    a = 1;
                    cnt = 0;
                    j = 0;
                    intros.play(1);
                }
            } else
            if(a == 1)
            {
                j = 5;
                intcnt++;
                g.drawImage(gintro, 0, 0, 20);
                g.setColor(255, 255, 255);
                intcnt++;
                if(intcnt % 5 != 0)
                    g.drawImage(joy, 42, 200, 20);
                if(intcnt > 10)
                    intcnt = 0;
            } else
            if(a == 2)
            {
                g.drawImage(menu, 0, 0, 20);
                g.drawImage(m2w, 5, h - 12, 20);
                g.drawImage(bul, 25, sely, 20);
                g.setColor(0);
                g.setFont(Font.getFont(0, 1, 8));
                if(gend == 1)
                    if(game == 1)
                    {
                        if(no == 1)
                            g.setColor(0xf30a14);
                        else
                            g.setColor(0);
                        g.drawString("Continue Journey", 50, 70, 20);
                    } else
                    {
                        if(no == 1)
                            g.setColor(0xf30a14);
                        else
                            g.setColor(0);
                        g.drawString("Start Journey", 50, 70, 20);
                    }
                if(gend != 1)
                    if(game == 1)
                    {
                        if(no == 1)
                            g.setColor(0xf30a14);
                        else
                            g.setColor(0);
                        g.drawString("Continue Journey", 50, 70, 20);
                    } else
                    {
                        if(no == 1)
                            g.setColor(0xf30a14);
                        else
                            g.setColor(0);
                        g.drawString("Start Journey", 50, 70, 20);
                    }
                if(no == 2)
                {
                    g.setColor(0xf30a14);
                    g.drawString("The Story", 50, 85, 20);
                } else
                {
                    g.setColor(0);
                    g.drawString("The Story", 50, 85, 20);
                }
                if(no == 3)
                {
                    g.setColor(0xf30a14);
                    g.drawString("Tips", 50, 100, 20);
                } else
                {
                    g.setColor(0);
                    g.drawString("Tips", 50, 100, 20);
                }
                if(no == 4)
                {
                    g.setColor(0xf30a14);
                    if(sound == 0)
                        g.drawString("Sound(on)", 50, 115, 20);
                    else
                        g.drawString("Sound(off)", 50, 115, 20);
                } else
                {
                    g.setColor(0);
                    if(sound == 0)
                        g.drawString("Sound(on)", 50, 115, 20);
                    else
                        g.drawString("Sound(off)", 50, 115, 20);
                }
                if(no == 5)
                {
                    g.setColor(0xf30a14);
                    g.drawString("High Score ", 50, 130, 20);
                } else
                {
                    g.setColor(0);
                    g.drawString("High Score ", 50, 130, 20);
                }
                if(no == 6)
                {
                    g.setColor(0xf30a14);
                    g.drawString("About", 50, 145, 20);
                } else
                {
                    g.setColor(0);
                    g.drawString("About", 50, 145, 20);
                }
                if(no == 7)
                {
                    g.setColor(0xf30a14);
                    g.drawString("Exit", 50, 160, 20);
                } else
                {
                    g.setColor(0);
                    g.drawString("Exit", 50, 160, 20);
                }
            } else
            if(a == 3)
            {
                g.drawImage(menu, 0, 0, 20);
                g.drawImage(m2w, 5, h - 12, 20);
                g.setFont(Font.getFont(0, 1, 0));
                g.drawString("The Story", getWidth() / 2, 45, 17);
                g.setClip(0, 60, 176, 90);
                g.setColor(0);
                g.setFont(Font.getFont(0, 0, 8));
                for(int i = 0; i < 18; i++)
                    g.drawString(sum[i], 15, (60 + i * 15) - sumx, 20);

                g.setColor(255, 255, 0);
                g.fillRect(170, 60, 5, 65);
                g.setColor(0, 0, 0);
                g.fillRect(170, 60 + sumx / 3, 5, 5);
            } else
            if(a == 4)
            {
                g.drawImage(menu, 0, 0, 20);
                g.drawImage(m2w, 5, h - 12, 20);
                g.setFont(Font.getFont(0, 1, 0));
                g.drawString("Tips", getWidth() / 2, 45, 17);
                g.setClip(0, 60, 176, 90);
                g.setColor(0);
                g.setFont(Font.getFont(0, 1, 0));
                g.setFont(Font.getFont(0, 0, 8));
                for(int k = 0; k < 17; k++)
                    g.drawString(sum1[k], 15, (60 + k * 15) - sumx, 20);

                g.setColor(255, 255, 0);
                g.fillRect(170, 60, 5, 65);
                g.setColor(0, 0, 0);
                g.fillRect(170, 60 + sumx / 3, 5, 5);
            } else
            if(a == 5)
            {
                g.drawImage(menu, 0, 0, 20);
                g.drawImage(m2w, 5, h - 12, 20);
                g.setColor(0);
                g.setFont(Font.getFont(0, 1, 8));
                if(scr <= 0)
                {
                    g.drawString("You have not earned any", getWidth() / 2, 100, 17);
                    g.drawString("money yet to set a record. ", getWidth() / 2, 115, 17);
                } else
                {
                    g.drawString("The maximum money ", getWidth() / 2, 100, 17);
                    if(scr == 1)
                        g.drawString("earned is " + scr + " coin.", getWidth() / 2, 115, 17);
                    else
                        g.drawString("earned is " + scr + " coins.", getWidth() / 2, 115, 17);
                }
            } else
            if(a == 6)
            {
                g.setColor(0, 0, 0);
                g.fillRect(0, 0, w, h);
                g.drawImage(menu, 0, 0, 20);
                g.drawImage(m2w, 5, h - 12, 20);
                g.setColor(0);
                g.setFont(Font.getFont(0, 1, 8));
                g.drawString("About", getWidth() / 2, 45, 17);
                g.setFont(Font.getFont(0, 0, 8));
                g.drawString("Copyright \251 Mobile2win Ltd.", 5, 60, 20);
                g.drawString("For any enquiries, send an email ", 5, 72, 20);
                g.drawString("to games@mobile2win.com.", 5, 84, 20);
                g.drawString("Visit us at www.mobile2win.com", 5, 96, 20);
            } else
            if(a == 7)
            {
                destroyApp(false);
                notifyDestroyed();
            } else
            if(a == 10)
            {
                gamePaint = 0;
                if(gend == 1)
                {
                    PlayAgain();
                    gend = 0;
                }
                display.setCurrent(obj);
            }
        }

        public void scroll1()
        {
            if(fire == 1 && j == 5)
            {
                a = 2;
                j = 0;
                fire = 0;
            } else
            if(fire == 1 && a == 2 && no == 1)
            {
                a = 10;
                fire = 0;
            } else
            if(fire == 1 && a == 2 && no == 2)
            {
                a = 3;
                fire = 0;
                sumx = 0;
            } else
            if(fire == 1 && a == 3 && no == 2)
            {
                a = 2;
                fire = 0;
            } else
            if(fire == 1 && a == 2 && no == 4 && sound == 0)
            {
                sound = 1;
                fire = 0;
            } else
            if(fire == 1 && a == 2 && no == 4 && sound == 1)
            {
                sound = 0;
                fire = 0;
            } else
            if(fire == 1 && a == 2 && no == 3)
            {
                a = 4;
                fire = 0;
                sumx = 0;
            } else
            if(fire == 1 && a == 4 && no == 3)
            {
                a = 2;
                fire = 0;
            } else
            if(fire == 1 && a == 2 && no == 5)
            {
                a = 5;
                fire = 0;
            } else
            if(fire == 1 && a == 5 && no == 5)
            {
                a = 2;
                fire = 0;
            } else
            if(fire == 1 && a == 2 && no == 6)
            {

⌨️ 快捷键说明

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