資源簡介
java飛機大戰的代碼以及相應的各種素材,幫助新手入手java
代碼片段和文件信息
package?zmf.game.shoot;
import?java.util.Random;
public?class?Airplane?extends?Flyingobject?implements?Enemy?ShootBy{
private?int?speed?=?2;
public?Airplane()?{
setImage(ShootGame.airplane);
setWidth(ShootGame.airplane.getWidth());
setHeight(ShootGame.airplane.getHeight());
Random?random?=?new?Random();
setX(random.nextInt(ShootGame.WIDTH-getWidth()));
}
public?void?step()?{
setY(getY()?+?speed);
}
public?boolean?outOfBounds()?{
return?getY()?>?ShootGame.HEIGHT;
}
public?int?getScore()?{
return?5;
}
public?boolean?shootBy(Bullet?b)?{
return?b.getX()?>?this.getX()?-?b.getWidth()?&&?b.getX()? &&?b.getY()?>?-b.getHeight()?&&?b.getY()? }
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-10-15?09:17??new.shoot\
?????文件?????????301??2018-10-03?12:06??new.shoot\.classpath
?????文件?????????385??2018-10-03?12:06??new.shoot\.project
?????目錄???????????0??2018-10-15?09:17??new.shoot\.settings\
?????文件?????????598??2018-10-03?12:06??new.shoot\.settings\org.eclipse.jdt.core.prefs
?????目錄???????????0??2018-10-15?09:17??new.shoot\bin\
?????目錄???????????0??2018-10-15?09:17??new.shoot\bin\zmf\
?????目錄???????????0??2018-10-15?09:17??new.shoot\bin\zmf\game\
?????目錄???????????0??2018-10-15?09:17??new.shoot\bin\zmf\game\shoot\
?????文件????????1436??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\Airplane.class
?????文件????????3575??2018-09-30?16:06??new.shoot\bin\zmf\game\shoot\airplane0.png
?????文件?????????213??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\Award.class
?????文件???????26709??2018-09-30?16:04??new.shoot\bin\zmf\game\shoot\background.png
?????文件????????1590??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\Bee.class
?????文件????????6405??2018-09-30?16:04??new.shoot\bin\zmf\game\shoot\bee0.png
?????文件?????????946??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\Bullet.class
?????文件?????????408??2018-09-30?16:06??new.shoot\bin\zmf\game\shoot\bullet.png
?????文件?????????131??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\Enemy.class
?????文件????????1359??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\Flyingob
?????文件???????20220??2018-09-30?16:04??new.shoot\bin\zmf\game\shoot\gameover.png
?????文件????????2472??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\Hero.class
?????文件???????12280??2018-09-30?16:04??new.shoot\bin\zmf\game\shoot\hero0.png
?????文件???????16243??2018-09-30?16:04??new.shoot\bin\zmf\game\shoot\hero1.png
?????文件???????14902??2018-09-30?16:04??new.shoot\bin\zmf\game\shoot\pause.png
?????文件?????????157??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\ShootBy.class
?????文件????????2083??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\ShootGame$1.class
?????文件?????????888??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\ShootGame$2.class
?????文件????????9004??2018-10-14?18:17??new.shoot\bin\zmf\game\shoot\ShootGame.class
?????文件???????22906??2018-09-30?16:06??new.shoot\bin\zmf\game\shoot\start.png
?????目錄???????????0??2018-10-15?09:17??new.shoot\src\
?????目錄???????????0??2018-10-15?09:17??new.shoot\src\zmf\
............此處省略58個文件信息
- 上一篇:java寫快遞柜管理系統
- 下一篇:java超級瑪麗
評論
共有 條評論