資源簡介
我們幾個同學一起開發的一款JAVA雷霆戰機游戲,功能一般,可以作為學習參考,希望對各位有幫助。
代碼片段和文件信息
package?com.ftz.ThunderPlane.Entity.Boss;
import?java.awt.Graphics;
import?java.awt.Rectangle;
import?com.ftz.ThunderPlane.frame.GameStart;
import?com.ftz.ThunderPlane.Util.ImageCommon;
public?abstract?class?Boss?{
public?int?boss_x;
public?int?boss_y;
public?int?boss_speed?=?1;
public?int?boss_bullet_move;
public?int?boss_step?=?0;
public?boolean?boss_live?=?true;
public?int?boss_life?=?30000;
public?GameStart?gs;
public?Boss(int?bossX?int?bossY?int?bossBulletMove?GameStart?gs)?{
boss_x?=?bossX;
boss_y?=?bossY;
boss_bullet_move?=?bossBulletMove;
this.gs?=?gs;
}
public?Rectangle?getRectangle(int?widthint?height){
return?new?Rectangle(boss_x?boss_y?width?height);
}
//發子彈
public?abstract?void?fire();
//顯示自己
public?abstract?void?showMe(Graphics?g);
//boss移動
public?void?move()?{
if?(boss_step?==?0)?{
boss_y?+=?boss_speed;
if?(boss_y?>=?50)?{
boss_step?=?1;
}
}
if?(boss_step?==?1)?{
boss_x?-=?boss_speed;
if?(boss_x?<=?-10)?{
boss_step?=?2;
}
}
if?(boss_step?==?2)?{
boss_x?+=?boss_speed;
if?(boss_x?>=?200)?{
boss_step?=?1;
}
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????355??2012-06-29?09:36??ThunderPlane2.0\.classpath
?????文件????????391??2012-06-26?14:01??ThunderPlane2.0\.project
?????文件????????629??2012-06-26?14:01??ThunderPlane2.0\.settings\org.eclipse.jdt.core.prefs
?????文件????????137??2012-06-27?20:59??ThunderPlane2.0\.settings\org.eclipse.ltk.core.refactoring.prefs
?????文件???????6067??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust01.png
?????文件???????5738??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust02.png
?????文件???????5640??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust03.png
?????文件???????5641??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust04.png
?????文件???????5665??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust05.png
?????文件???????5690??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust06.png
?????文件???????6213??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust07.png
?????文件???????6301??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust08.png
?????文件???????6241??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust09.png
?????文件???????4602??2012-06-28?23:14??ThunderPlane2.0\bin\bones\brust10.png
?????文件???????1284??2012-06-29?10:22??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Boss\Boss.class
?????文件???????2916??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Boss\Boss_1.class
?????文件???????4075??2012-06-29?09:58??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Bullet\Bullet.class
?????文件???????3062??2012-06-29?09:58??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Bullet\EBullet.class
?????文件???????3159??2012-06-29?09:57??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\EPlane\EPlane.class
?????文件???????1037??2012-06-29?09:45??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Music\Music_Background.class
?????文件???????1027??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Music\Music_explode.class
?????文件???????1019??2012-06-29?09:43??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Music\Music_Shoot.class
?????文件???????1566??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Plane\Explode.class
?????文件???????4618??2012-06-29?09:43??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Plane\Plane.class
?????文件????????274??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Plane\PlaneInterface.class
?????文件????????924??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Plane\PlaneMove.class
?????文件???????1797??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Tool\Tool.class
?????文件????????943??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Tool\Tool_AddBlood.class
?????文件????????940??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Tool\Tool_AddLife.class
?????文件????????955??2012-06-29?09:36??ThunderPlane2.0\bin\com\ftz\ThunderPlane\Entity\Tool\Tool_AddMoney.class
............此處省略190個文件信息
評論
共有 條評論