资源简介

飞扬小鸟的三个版本的源代码(超详细备注)和图片资源,外附编程的思想,要个3分不贵吧,献给爱玩的java初学者,高手勿笑

资源截图

代码片段和文件信息

package flappyBird;

import java.awt.Graphics;
import java.awt.image.BufferedImage;
import java.io.IOException;

import javax.imageio.ImageIO;

public class Background {
BufferedImage image2;
// BufferedImage image3;
int x2;
int y2;
// int x3;
// int y3;
int width2;
int height2;
// int width3;
// int height3;
public Background(int n) throws IOException{
y2 = 0;
image2 = ImageIO.read(getClass().getResource(“bg.png“));
width2 = image2.getWidth();
height2 = image2.getHeight();
x2 = n;
// y3 =0;
// image3 = ImageIO.read(getClass().getResource(“bg.png“));
// width3 = image3.getWidth();
// height3 = image3.getHeight();
// x3 = 432;
}
public void step(){
x2--;
if(x2<= -(432)){
x2=432;
}
// x3--;
// if(x3<= -(432)){
// x3=432;
// }
}
public void paint(Graphics g) {
g.drawImage(image2 x2 y2 null);
// g.drawImage(image3 x3 y3 null);
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2014-02-28 21:55  MyBird\
     文件         301  2014-02-20 22:03  MyBird\.classpath
     文件         382  2014-02-20 22:03  MyBird\.project
     目录           0  2014-02-20 22:03  MyBird\.settings\
     文件         629  2014-02-20 22:03  MyBird\.settings\org.eclipse.jdt.core.prefs
     目录           0  2014-03-10 21:49  MyBird\bin\
     目录           0  2014-03-10 21:49  MyBird\bin\flappyBird\
     文件        3157  2014-02-20 20:20  MyBird\bin\flappyBird\0.png
     文件        3167  2014-02-20 20:20  MyBird\bin\flappyBird\1.png
     文件        3159  2014-02-20 20:20  MyBird\bin\flappyBird\2.png
     文件        3165  2014-02-20 20:20  MyBird\bin\flappyBird\3.png
     文件        3157  2014-02-20 20:20  MyBird\bin\flappyBird\4.png
     文件        3165  2014-02-20 20:20  MyBird\bin\flappyBird\5.png
     文件        3159  2014-02-20 20:20  MyBird\bin\flappyBird\6.png
     文件        3167  2014-02-20 20:20  MyBird\bin\flappyBird\7.png
     文件        1271  2014-03-10 21:49  MyBird\bin\flappyBird\Background.class
     文件        9226  2014-02-20 20:21  MyBird\bin\flappyBird\bg.png
     文件        3470  2014-03-10 21:49  MyBird\bin\flappyBird\Bird.class
     文件        1518  2014-03-10 21:49  MyBird\bin\flappyBird\Column.class
     文件        5588  2014-02-20 20:21  MyBird\bin\flappyBird\column.png
     文件        8684  2014-02-20 20:21  MyBird\bin\flappyBird\gameover.png
     文件        1236  2014-03-10 21:49  MyBird\bin\flappyBird\Ground.class
     文件        3567  2014-02-20 20:21  MyBird\bin\flappyBird\ground.png
     文件        9600  2014-02-20 20:21  MyBird\bin\flappyBird\start.png
     文件         813  2014-03-10 21:49  MyBird\bin\flappyBird\World$1.class
     文件         877  2014-03-10 21:49  MyBird\bin\flappyBird\World$2.class
     文件        3973  2014-03-10 21:49  MyBird\bin\flappyBird\World.class
     目录           0  2014-02-20 22:16  MyBird\bin\flappyBird_super\
     文件        3157  2014-02-20 20:20  MyBird\bin\flappyBird_super\0.png
     文件        3167  2014-02-20 20:20  MyBird\bin\flappyBird_super\1.png
     文件        3159  2014-02-20 20:20  MyBird\bin\flappyBird_super\2.png
............此处省略149个文件信息

评论

共有 条评论