資源簡介
附贈課程設計報告以及使用說明書等。
界面美觀,圖片和音樂等資源完整。
代碼片段和文件信息
package?mario;
import?java.applet.AudioClip;
import?java.awt.image.BufferedImage;
import?java.util.ArrayList;
import?java.util.List;
public?class?BackGround?{
public?boolean?isOver()?{
return?isOver;
}
public?void?setOver(boolean?isOver)?{
this.isOver?=?isOver;
}
private?boolean?isDown=false; public?boolean?isDown()?{
return?isDown;
}
public?void?setDown(boolean?isDown)?{
this.isDown?=?isDown;
}
//當前場景背景
private?BufferedImage?bgImage=null;
//場景順序
private?int?sort;
//當前是否為最后一個場景
private?boolean?flag;
//通過集合來保存
//全部的敵人
private?List?allEnemy?=new?ArrayList();
//全部的障礙物
private?List?allObstruction?=new?ArrayList();
//被消滅的敵人
private?List?removedEnemy=new?ArrayList();
//被消滅的障礙物
private?List?RemovedObstruction?=new?ArrayList();
private?boolean?isOver=false;
public?BackGround(int?sortboolean?flag){
this.sort=sort;
this.flag=flag;
if(flag){
bgImage=StaticValue.endImage;
}else{
bgImage=StaticValue.bgImage;
}
if(sort==1){
//繪制地面
for(int?i=0;i<15;i++){
this.allObstruction.add(new?Obstruction(i*605409this));
}
//繪制磚塊和問號磚塊
this.allObstruction.add(new?Obstruction(1203604this));
this.allObstruction.add(new?Obstruction(3003600this));
this.allObstruction.add(new?Obstruction(3603604this));
this.allObstruction.add(new?Obstruction(4203600this));
this.allObstruction.add(new?Obstruction(4803604this));
this.allObstruction.add(new?Obstruction(5403600this));
this.allObstruction.add(new?Obstruction(4203600this));
this.allObstruction.add(new?Obstruction(4201804this));
//繪制水管
this.allObstruction.add(new?Obstruction(11*60600-2*608this));
this.allObstruction.add(new?Obstruction(12*60600-2*607this));
this.allObstruction.add(new?Obstruction(11*60600-606this));
this.allObstruction.add(new?Obstruction(12*60600-605this));
//加入隱形磚塊
this.allObstruction.add(new?Obstruction(6603003this));
//繪制敵人
this.allEnemy.add(new?Enemy(600480true1this));
this.allEnemy.add(new?Enemy(690540true2420540this));
}
if(sort==2){
//繪制地面
for(int?i=0;i<15;i++){
//在10處加入一個陷阱
if(i!=10){
this.allObstruction.add(new?Obstruction(i*605409this));
}
}
this.allObstruction.add(new?Obstruction(605406this));
this.allObstruction.add(new?Obstruction(1205405this));
this.allObstruction.add(new?Obstruction(604806this));
this.allObstruction.add(new?Obstruction(1204805this));
this.allObstruction.add(new?Obstruction(604208this));
this.allObstruction.add(new?Obstruction(1204207this));
this.allObstruction.add(new?Obstruction(2405406this));
this.allObstruction.add(new?Obstruction(3005405this));
this.allObstruction.add(new?Obstruction(2404806this));
thi
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????10653??2016-05-05?18:20??游戲使用說明.docx
?????文件????????379??2016-05-07?01:52??mario4.0\.classpath
?????文件????????384??2016-05-07?01:52??mario4.0\.project
?????文件????????629??2016-05-07?01:52??mario4.0\.settings\org.eclipse.jdt.core.prefs
?????文件???????1601??2016-05-07?01:52??mario4.0\bin\1.gif
?????文件???????1598??2016-05-07?01:52??mario4.0\bin\10.gif
?????文件???????1579??2016-05-07?01:52??mario4.0\bin\2.gif
?????文件???????1600??2016-05-07?01:52??mario4.0\bin\3.gif
?????文件??????83423??2016-05-07?01:52??mario4.0\bin\3.jpg
?????文件???????1627??2016-05-07?01:52??mario4.0\bin\4.gif
?????文件??????82705??2016-05-07?01:52??mario4.0\bin\4.jpg
?????文件???????1594??2016-05-07?01:52??mario4.0\bin\5.gif
?????文件???????1606??2016-05-07?01:52??mario4.0\bin\6.gif
?????文件???????1607??2016-05-07?01:52??mario4.0\bin\7.gif
?????文件???????1587??2016-05-07?01:52??mario4.0\bin\8.gif
?????文件???????1626??2016-05-07?01:52??mario4.0\bin\9.gif
?????文件??????19963??2016-05-07?01:52??mario4.0\bin\firststage.gif
?????文件??????25492??2016-05-07?01:52??mario4.0\bin\firststageend.gif
?????文件???????1239??2016-05-07?01:52??mario4.0\bin\flower1.gif
?????文件???????1538??2016-05-07?01:52??mario4.0\bin\flower2.gif
?????文件??????83079??2016-05-07?01:52??mario4.0\bin\image1.jpg
?????文件??????82621??2016-05-07?01:52??mario4.0\bin\image2.jpg
?????文件???????4857??2016-05-12?21:33??mario4.0\bin\mario\BackGround.class
?????文件???????3529??2016-05-12?21:33??mario4.0\bin\mario\BackGroundTest.class
?????文件???????4745??2016-05-12?21:33??mario4.0\bin\mario\Enemy.class
?????文件???????3766??2016-05-12?21:33??mario4.0\bin\mario\EnemyTest.class
?????文件???????6179??2016-05-12?21:33??mario4.0\bin\mario\Mario.class
?????文件???????3974??2016-05-12?21:33??mario4.0\bin\mario\MarioTest.class
?????文件???????1825??2016-05-12?21:33??mario4.0\bin\mario\Music.class
?????文件???????6275??2016-05-12?22:00??mario4.0\bin\mario\Myfr
............此處省略62個文件信息
- 上一篇:j4l圖片數字識別
- 下一篇:簡單的javaweb項目
評論
共有 條評論