亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fallingstars.java

?? JAVA游戲程序-例,JAVA的消息機制與簡單的用戶交互程序
?? JAVA
?? 第 1 頁 / 共 3 頁
字號:
                for(tempInt = 1; tempInt <= numberOffStars; tempInt++)
                {
                    if(mouseMoved)
                    {
                        mouseMove();
                    }
                    switch(starSize[tempInt])
                    {
                    case 0: // '\0'
                        explosion.stop();
                        pause(10);
                        explosion.play();
                        starSize[tempInt] = 2;
                        exploding = true;
                        repaint();
                        break;

                    case 1: // '\001'
                        starX[tempInt] += starXAdd[tempInt];
                        if(starX[tempInt] > size().width - 5)
                        {
                            starX[tempInt] = (starX[tempInt] - (size().width - 5)) + 5;
                        }
                        if(starX[tempInt] < 5)
                        {
                            starX[tempInt] += size().width - 10;
                        }
                        starY[tempInt] += starYAdd[tempInt];
                        if(starY[tempInt] > size().height - 35)
                        {
                            starY[tempInt] -= size().height - 35;
                        }
                        offscreenG.drawImage(star, starX[tempInt] - (star.getWidth(this) * starSize[tempInt]) / 2, starY[tempInt] - (star.getHeight(this) * starSize[tempInt]) / 2, star.getWidth(this) * starSize[tempInt], star.getHeight(this) * starSize[tempInt], this);
                        break;

                    default:
                        starSize[tempInt]++;
                        if(starSize[tempInt] <= 6)
                        {
                            offscreenG.drawImage(star, starX[tempInt] - (star.getWidth(this) * starSize[tempInt]) / 2, starY[tempInt] - (star.getHeight(this) * starSize[tempInt]) / 2, star.getWidth(this) * starSize[tempInt], starSize[tempInt] * star.getHeight(this), this);
                        } else
                        {
                            endStar(tempInt);
                        }
                        break;
                    }
                    if(starX[tempInt] + star.getWidth(this) / 2 > shipX - ship.getWidth(this) / 2 && starX[tempInt] + star.getWidth(this) / 2 < shipX + ship.getWidth(this) / 2 && starY[tempInt] + star.getHeight(this) > size().height - 65)
                    {
                        shiphit = true;
                        numberOffShips--;
                        replaceStar(tempInt);
                    }
                    if(shiphit)
                    {
                        explosion.stop();
                        shipExploding.play();
                        shipExplode();
                        if(numberOffShips == 0)
                        {
                            theEnd();
                        }
                        shiphit = false;
                    }
                }

                repaint();
                pause(100 - (((level - 1) / 4) * 80 * numberOffStars) / maxStars);
                offscreenG.setColor(Color.black);
                offscreenG.fillRect(0, 0, size().width, size().height);
            } else
            if(starting)
            {
                makeItBlack();
                choiceLevel();
            } else
            {
                for(tempInt = 1; tempInt <= 10; tempInt++)
                {
                    offscreenG.setColor(Color.black);
                    offscreenG.fillRect(0, 0, size().width, size().height);
                    offscreenG.setColor(Color.green);
                    sky();
                    introText();
                    border();
                    offscreenG.setFont(f);
                    offscreenG.drawString(startString, (size().width - fm.stringWidth(startString)) / 2, size().height / 2);
                    repaint();
                    pause(100);
                }

                for(tempInt = 1; tempInt <= 10; tempInt++)
                {
                    offscreenG.setColor(Color.black);
                    offscreenG.fillRect(0, 0, size().width, size().height);
                    offscreenG.setColor(Color.red);
                    sky();
                    introText();
                    border();
                    offscreenG.setFont(f);
                    offscreenG.drawString(startString, (size().width - fm.stringWidth(startString)) / 2, size().height / 2);
                    repaint();
                    pause(100);
                }

            }
        }
    }

    public void update(Graphics g)
    {
        if(!ended)
        {
            if(started)
            {
                if(exploding)
                {
                    g.setColor(Color.white);
                    g.fillRect(0, 0, size().width, size().height);
                    g.drawImage(ship, shipX, size().height - 65, this);
                    border(Color.red);
                    scoreBoard(Color.red);
                    exploding = false;
                }
                if(shiphit)
                {
                    offscreenG.drawImage(shipexplode, shipX - (shipexplode.getWidth(this) * tempInt2) / 2, size().height - shipexplode.getHeight(this) * tempInt2 - 35, shipexplode.getWidth(this) * tempInt2, shipexplode.getHeight(this) * tempInt2, this);
                    border(Color.red);
                    scoreBoard(Color.red);
                } else
                {
                    offscreenG.drawImage(ship, shipX - ship.getWidth(this) / 2, size().height - 65, this);
                    border(Color.blue);
                    scoreBoard(Color.blue);
                    if(firing)
                    {
                        offscreenG.setColor(Color.red);
                        offscreenG.drawLine(shipX - 1, size().height - 65, shipX - 1, 6);
                        offscreenG.drawLine(shipX, size().height - 65, shipX, 6);
                        offscreenG.drawLine(shipX + 1, size().height - 65, shipX + 1, 6);
                        firing = false;
                    }
                }
                g.drawImage(offscreenI, 0, 0, this);
                return;
            } else
            {
                g.drawImage(offscreenI, 0, 0, this);
                return;
            }
        } else
        {
            g.drawImage(offscreenI, 0, 0, this);
            return;
        }
    }

    public int rnd(int i)
    {
        return (int)((double)i * Math.random());
    }

    public void sky()
    {
        for(int i = 1; i <= 5; i++)
        {
            offscreenG.drawImage(star, rnd(size().width), rnd(size().height), this);
        }

    }

    public void border()
    {
        for(int i = 0; i <= 4; i++)
        {
            offscreenG.drawRect(i, i, size().width - 2 * i, size().height - 2 * i);
        }

    }

    public void border(Color color)
    {
        Color color1 = offscreenG.getColor();
        offscreenG.setColor(color);
        border();
        offscreenG.setColor(color1);
    }

    public void introText()
    {
        Color color = offscreenG.getColor();
        offscreenG.setColor(Color.white);
        offscreenG.setFont(f2);
        introY--;
        if(introY <= -330)
        {
            introY = size().height + 10;
        }
        offscreenG.drawImage(ship, size().width / 2 - ship.getWidth(this) / 2, introY, this);
        offscreenG.drawString(introText1, (size().width - fm2.stringWidth(introText1)) / 2, introY + 50);
        offscreenG.drawString(introText2, (size().width - fm2.stringWidth(introText2)) / 2, introY + 70);
        offscreenG.drawString(introText3, (size().width - fm2.stringWidth(introText3)) / 2, introY + 90);
        offscreenG.drawString(introText4, (size().width - fm2.stringWidth(introText4)) / 2, introY + 110);
        offscreenG.drawString(introText5, (size().width - fm2.stringWidth(introText5)) / 2, introY + 130);
        offscreenG.drawString(introText6, (size().width - fm2.stringWidth(introText6)) / 2, introY + 150);
        offscreenG.drawString(introText7, (size().width - fm2.stringWidth(introText7)) / 2, introY + 170);
        offscreenG.drawString(introText8, (size().width - fm2.stringWidth(introText8)) / 2, introY + 190);
        offscreenG.drawString(introText9, (size().width - fm2.stringWidth(introText9)) / 2, introY + 210);
        offscreenG.drawString(introText10, (size().width - fm2.stringWidth(introText10)) / 2, introY + 230);
        offscreenG.drawString(introText11, (size().width - fm2.stringWidth(introText11)) / 2, introY + 250);
        offscreenG.drawString(introText12, (size().width - fm2.stringWidth(introText12)) / 2, introY + 270);
        offscreenG.drawString(introText13, (size().width - fm2.stringWidth(introText13)) / 2, introY + 290);
        offscreenG.drawString(introText14, (size().width - fm2.stringWidth(introText14)) / 2, introY + 310);
        offscreenG.drawString(introText15, (size().width - fm2.stringWidth(introText15)) / 2, introY + 330);
        offscreenG.drawString(introText16, (size().width - fm2.stringWidth(introText16)) / 2, introY + 350);
        offscreenG.drawString(introText17, (size().width - fm2.stringWidth(introText17)) / 2, introY + 370);
        offscreenG.setColor(color);
    }

    public void makeItBlack()
    {
        offscreenG.setColor(Color.black);
        for(int i = 1; i <= size().height / 2; i += 5)
        {
            int j = (size().height * i) / size().width;
            offscreenG.setColor(Color.black);
            offscreenG.fillRect(size().width / 2 - i, size().height / 2 - j, 2 * i, 2 * j);
            offscreenG.setColor(Color.blue);
            offscreenG.drawRect(size().width / 2 - i, size().height / 2 - j, 2 * i, 2 * j);
            repaint();
            pause(10);
        }

        border(Color.blue);
        repaint();
    }

    public void hitCheck()
    {
        for(int i = 1; i <= numberOffStars; i++)
        {
            if((starX[i] - 4 <= shipX + 1 && starX[i] + 4 >= shipX + 1 || starX[i] - 4 <= shipX - 1 && starX[i] + 4 >= shipX - 1) && starSize[i] == 1)
            {
                starSize[i] = 0;
                score++;
            }
        }

    }

    public void paint(Graphics g)
    {
        update(g);
    }

    public void pause(int i)
    {
        try
        {
            Thread.sleep(i);
            return;
        }
        catch(InterruptedException _ex)
        {
            return;
        }
    }

    public void replaceStar(int i)
    {
        starX[i] = (int)((double)(size().width - 56) * Math.random() + 28D);
        starY[i] = 6;
        starYAdd[i] = (int)(5D + 13D * Math.random());
        starYAdd[i] = starYAdd[i] / (6 - level);
        starXAdd[i] = (int)((double)(starYAdd[i] + 1) * Math.random());
        if(starXAdd[i] > starYAdd[i])
        {
            starXAdd[i] = starYAdd[i];
        }
        if(Math.random() < 0.5D)
        {
            starXAdd[i] *= -1;
        }
    }

    public void shipExplode()
    {
        for(tempInt2 = 1; tempInt2 <= 8; tempInt2++)
        {
            offscreenG.drawImage(shipexplode, shipX - (shipexplode.getWidth(this) * tempInt2) / 2, size().height - shipexplode.getHeight(this) * tempInt2 - 35, shipexplode.getWidth(this) * tempInt2, shipexplode.getHeight(this) * tempInt2, this);
            repaint();
            pause(150);
        }

        for(int i = 1; i <= numberOffStars; i++)
        {
            if(starX[i] > shipX - (shipexplode.getWidth(this) * 4) / 2 && starX[i] < shipX + (shipexplode.getWidth(this) * 4) / 2 && starY[i] > size().height - shipexplode.getHeight(this) * 4 - 35)
            {
                replaceStar(i);
            }
            if(shipX - (shipexplode.getWidth(this) * 4) / 2 < 5 && starX[i] > size().width - 5 - shipX - (shipexplode.getWidth(this) * 4) / 2 - 5 && starY[i] > size().height - shipexplode.getHeight(this) * 4 - 35)
            {
                replaceStar(i);
            }
            if(shipX + (shipexplode.getWidth(this) * 4) / 2 > size().width - 5 && starX[i] < ((shipX + (shipexplode.getWidth(this) * 4) / 2) - (size().width - 5)) + 5 && starY[i] > size().height - shipexplode.getHeight(this) * 4 - 35)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产91丝袜在线播放九色| 国产目拍亚洲精品99久久精品| 国产精品日产欧美久久久久| 久久99精品久久久久婷婷| 欧美一区二区三区白人| 日韩精品一区第一页| 欧美日韩精品一区二区| 午夜精品国产更新| 欧美日韩在线观看一区二区 | 欧美日韩国产天堂| 亚洲天堂网中文字| 不卡的av在线| 亚洲国产日韩精品| 99久久综合国产精品| 国产精品福利在线播放| 91亚洲精品久久久蜜桃网站| 综合网在线视频| 一本色道**综合亚洲精品蜜桃冫| 国产精品美女视频| 91日韩在线专区| 自拍偷拍亚洲欧美日韩| 欧美在线观看视频在线| 日本午夜一区二区| 国产午夜精品福利| 91一区二区在线观看| 亚洲卡通动漫在线| 91精品欧美一区二区三区综合在| 免费精品99久久国产综合精品| 欧美疯狂性受xxxxx喷水图片| 另类调教123区| 中文字幕中文字幕一区二区| 国内外精品视频| 亚洲欧洲成人精品av97| av中文字幕一区| 亚洲第一成人在线| 久久综合色8888| 91色九色蝌蚪| 免费久久精品视频| 日韩伦理电影网| 久久久综合网站| 欧美日韩久久一区| 一本到三区不卡视频| 国产乱子伦视频一区二区三区 | 成人免费一区二区三区视频| 欧美福利视频一区| 色婷婷精品久久二区二区蜜臂av| 国产一区二区三区久久悠悠色av| 亚洲国产精品久久久男人的天堂| 国产精品美女一区二区| 久久久国产综合精品女国产盗摄| 欧美日韩大陆一区二区| 91在线视频免费观看| 国产精品白丝av| 久久精品国产久精国产| 日韩中文字幕区一区有砖一区| 亚洲私人黄色宅男| 欧美国产日韩精品免费观看| 精品国产乱子伦一区| 91精品在线麻豆| 欧美猛男男办公室激情| 欧美视频一区在线观看| 在线观看欧美黄色| 色噜噜偷拍精品综合在线| 99久久伊人网影院| av激情综合网| 99国产精品久| 91网站最新网址| 97精品视频在线观看自产线路二| 成人在线一区二区三区| 国产大片一区二区| 国产成人免费高清| 国产精品77777| 国产成人午夜99999| 国产乱妇无码大片在线观看| 国产麻豆精品在线观看| 国产乱码精品一品二品| 国产精品白丝av| a级精品国产片在线观看| 99久久精品免费精品国产| 91亚洲国产成人精品一区二三 | 五月婷婷色综合| 日本va欧美va精品| 韩国成人福利片在线播放| 国产乱人伦偷精品视频免下载 | 欧美日韩久久一区| 欧美一区二区在线视频| 日韩一区二区电影网| 久久综合久久综合久久综合| 国产亚洲欧美日韩俺去了| 国产精品黄色在线观看| 亚洲午夜久久久久中文字幕久| 视频一区二区中文字幕| 韩国精品久久久| 99re热这里只有精品视频| 欧美三级蜜桃2在线观看| 欧美一区二区网站| 久久精品欧美一区二区三区不卡 | 成人av综合一区| 在线看不卡av| 欧美一区二区三区电影| 国产欧美精品在线观看| 一区二区三区久久久| 视频一区中文字幕| 国产91精品一区二区麻豆网站| 91蜜桃免费观看视频| 欧美一区二区三区免费大片| 中文字幕精品三区| 亚洲成人一二三| 国产激情91久久精品导航| 91黄色在线观看| 精品国产第一区二区三区观看体验| 欧美国产1区2区| 午夜成人免费视频| 国产成人综合视频| 欧美日韩视频在线一区二区| 久久久久久电影| 午夜亚洲福利老司机| 懂色av一区二区在线播放| 欧美久久久久久蜜桃| 国产精品久久久久久久久动漫| 午夜精品免费在线| 不卡的电影网站| 精品成人一区二区| 亚洲一区二区欧美激情| 国产大陆亚洲精品国产| 在线电影一区二区三区| 日韩一区日韩二区| 国产成人一区在线| 欧美一区二区黄色| 伊人性伊人情综合网| 国产98色在线|日韩| 欧美一区二区三区小说| 亚洲欧洲一区二区在线播放| 精品亚洲porn| 在线播放欧美女士性生活| 亚洲精品高清在线| 欧美美女网站色| 亚洲视频每日更新| 国产乱人伦偷精品视频不卡| 91久久线看在观草草青青| 国产精品免费免费| 97se亚洲国产综合在线| 亚洲精品国产视频| 在线观看一区日韩| 亚洲高清免费一级二级三级| 日本韩国精品一区二区在线观看| 亚洲一卡二卡三卡四卡五卡| 欧美色男人天堂| 麻豆一区二区99久久久久| 2023国产精品自拍| 懂色av一区二区三区免费观看| 国产精品无遮挡| 91碰在线视频| 五月综合激情网| 欧美mv日韩mv国产| 成人免费电影视频| 亚洲黄一区二区三区| 欧美日韩精品福利| 国产做a爰片久久毛片| 国产精品短视频| 欧美日韩午夜影院| 国产福利一区在线| 一级日本不卡的影视| 69堂精品视频| 国产精品一二三四区| 亚洲视频中文字幕| 91精品婷婷国产综合久久| 国产精品影视天天线| 亚洲综合av网| 精品国精品国产| 成人a级免费电影| 日韩精品每日更新| 国产精品久久免费看| 在线观看视频欧美| 国产高清久久久| 亚洲福利一区二区三区| 国产偷国产偷亚洲高清人白洁| 欧美中文字幕一区二区三区亚洲| 麻豆精品国产传媒mv男同 | 日韩三级高清在线| caoporen国产精品视频| 丝袜诱惑亚洲看片| 国产精品欧美一级免费| 91精品国产高清一区二区三区| 成人av片在线观看| 强制捆绑调教一区二区| 椎名由奈av一区二区三区| 精品免费视频.| 欧美丝袜自拍制服另类| 国产精品亚洲人在线观看| 午夜精品久久久久久不卡8050| 国产精品久久久久久久久免费相片| 69堂国产成人免费视频| 色综合久久天天综合网| 国产一区在线视频| 偷窥国产亚洲免费视频| 亚洲精品视频在线看| 久久久国际精品| 日韩午夜在线观看视频| 欧美亚洲国产bt|