資源簡介
JAVA捕魚達人游戲源碼

代碼片段和文件信息
package?com.zte;
import?java.awt.Graphics;
import?java.awt.Graphics2D;
import?java.awt.Image;
import?java.awt.Point;
import?javax.swing.ImageIcon;
public?class?Bullet?{
public?int?x;//?橫坐標
public?int?y;//?縱坐標
static?int?xxx?=?0;
static?int?yyy?=?0;
Point?p;
public?ImageIcon?img;//?子彈代表的圖片
public?double?roate;//?子彈移動的角度
public?FishPanel?panel;
boolean?isLive?=?true;
public?Bullet(FishPanel?panel)?{
this.panel?=?panel;
}
public?void?move()?throws?InterruptedException?{
y?-=?20;
//?轉換x和y坐標
int?yy?=?Math.round((float)?Math.cos(roate)?*?(p.y?-?17?-?y));
yyy?=?p.y?-?17?-?Math.abs(yy);
System.out.println(yyy);
int?xx?=?Math.round((float)?Math.sin(roate)?*?(p.y?-?17?-?y));
xxx?=?p.x?-?10?+?xx;
System.out.println(xxx);
if?(yyy<=-10?||?xxx?<=?-10)?{
isLive?=?false;
panel.bullets.remove(this);
}
hint();
panel.repaint();
}
//?處理擊中某條魚?撒網
public?void?hint()?throws?InterruptedException{
for(int?i=0;i Fish?f?=?panel.fishs.get(i);
if(xxx>f.x-img.getIconWidth()?&&?xxx +f.imgs[f.imgNum].getIconWidth()?&&?y +f.imgs[f.imgNum].getIconHeight()){
FishNet?net?=?new?FishNet(xxx-30?yyy-50?
new?ImageIcon(“images/web.png“)panel); ???
????panel.bullets.remove(this);//子彈消失
????panel.nets.add(net);//子彈消失后撒網
????isLive?=?false;
????net.caFish();
????/*******************/
????Thread.sleep(500);//等2秒之后讓網消失
????panel.nets.remove(net);
}
}
}
public?void?drawBullet(Graphics?g)?{
Graphics2D?gp?=?(Graphics2D)?g.create();
gp.rotate(roate?p.x?p.y);
gp.drawImage(this.img.getImage()?x?y?panel);
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????301??2015-08-04?14:05??JAVA捕魚達人游戲源碼\.classpath
?????文件????????383??2015-08-04?14:05??JAVA捕魚達人游戲源碼\.project
?????文件????????629??2015-08-04?14:05??JAVA捕魚達人游戲源碼\.settings\org.eclipse.jdt.core.prefs
?????文件???????2882??2015-08-05?21:36??JAVA捕魚達人游戲源碼\bin\com\zte\Bullet.class
?????文件????????778??2015-08-05?21:26??JAVA捕魚達人游戲源碼\bin\com\zte\BulletThread.class
?????文件????????507??2015-08-05?20:21??JAVA捕魚達人游戲源碼\bin\com\zte\Demo.class
?????文件???????1959??2015-08-05?21:46??JAVA捕魚達人游戲源碼\bin\com\zte\Fish.class
?????文件???????1994??2015-08-05?21:40??JAVA捕魚達人游戲源碼\bin\com\zte\FishNet.class
?????文件???????5763??2015-08-05?22:10??JAVA捕魚達人游戲源碼\bin\com\zte\FishPanel.class
?????文件????????792??2015-08-05?21:16??JAVA捕魚達人游戲源碼\bin\com\zte\FishThread.class
?????文件????????975??2015-08-05?21:18??JAVA捕魚達人游戲源碼\bin\com\zte\LocationUtil$1.class
?????文件???????1187??2015-08-05?21:18??JAVA捕魚達人游戲源碼\bin\com\zte\LocationUtil$2.class
?????文件???????1927??2015-08-05?21:18??JAVA捕魚達人游戲源碼\bin\com\zte\LocationUtil.class
?????文件???????3581??2015-08-05?22:04??JAVA捕魚達人游戲源碼\bin\com\zte\Mainfr
?????文件???????3423??2015-08-05?22:04??JAVA捕魚達人游戲源碼\bin\com\zte\Mainfr
?????文件????????519??2015-08-05?21:17??JAVA捕魚達人游戲源碼\bin\com\zte\other\Demo.class
?????文件???????1017??2015-08-05?21:17??JAVA捕魚達人游戲源碼\bin\com\zte\other\LocationUtil$1.class
?????文件???????1229??2015-08-05?21:17??JAVA捕魚達人游戲源碼\bin\com\zte\other\LocationUtil$2.class
?????文件???????1981??2015-08-05?21:17??JAVA捕魚達人游戲源碼\bin\com\zte\other\LocationUtil.class
?????文件???????1289??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\A4.png
?????文件??????11389??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\bg.png
?????文件??????38197??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\bg1.jpg
?????文件?????188716??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\bg_03.png
?????文件????????845??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\bullet.png
?????文件???????1647??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\close.png
?????文件??????82994??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\icon.jpg
?????文件??????27308??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\left_to_right\fish01_01.png
?????文件??????27353??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\left_to_right\fish01_02.png
?????文件??????27494??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\left_to_right\fish01_03.png
?????文件??????27611??2015-07-28?12:53??JAVA捕魚達人游戲源碼\images\left_to_right\fish01_04.png
............此處省略445個文件信息
- 上一篇:iText-2.1.7.jar
- 下一篇:Java醫藥管理系統源碼
評論
共有 條評論