91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 45KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-16
  • 語言: Java
  • 標簽: Java??坦克游戲??

資源簡介

局域網坦克大戰源碼(Java版) qq :839160526

資源截圖

代碼片段和文件信息

package?wyf.cgq;
import?java.awt.*;
import?java.awt.event.*;
import?javax.swing.*;
import?javax.swing.event.*;
import?java.util.*;
public?class?Bullet
{
private?int?id;//子彈的id號,該號唯一標志一個子彈
private?int?tank_id;//該子彈所屬坦克的Id號
private?int?style;//子彈類型,0表示是敵人的坦克發出的,1表示是玩家坦克發出的?
private?int?direction;//代表方法1、2、3、4分別表示上、下、左、右
private?int?speed;//子彈的運行速度,
private?int?power;//子彈的殺傷力,即可以使對方掉多少血
private?int?bullet_x;//子彈所在矩形的左上角的X坐標
private?int?bullet_y;//子彈所在矩形的左上角的Y坐標
private?boolean?live=true;//子彈是否存活的狀態
public?Bullet(){}//無參構造器
public?Bullet(int?idint?bullet_xint?bullet_y){//構造器,用于客戶端用
this.id=id;
this.bullet_y=bullet_y;
this.bullet_x=bullet_x;
}
public?Bullet(int?idint?tank_idint?styleint?directionint?speedint?power
?????????????int?bullet_xint?bullet_y){//構造器,用于服務器端用
this.id=id;this.tank_id=tank_id;
this.style=style;this.direction=direction;
this.speed=speed;this.power=power;
this.bullet_x=bullet_x;this.bullet_y=bullet_y;
}
public?void?move(){//子彈運行的方法
if(direction==1){this.bullet_y-=speed;}//向上運行
else?if(direction==2){this.bullet_y+=speed;}//向下運行
else?if(direction==3){this.bullet_x-=speed;}//向左運行
else?if(direction==4){this.bullet_x+=speed;}//向下運行
}
public?int?getId(){return?this.id;}//獲得子彈的id號
public?int?getTank_id(){return?this.tank_id;}//獲得子彈所屬坦克的id號
public?int?getstyle(){return?this.style;}//獲得子彈的類型
public?int?getDirection(){return?this.direction;}//獲得子彈的方向
public?int?getPower(){return?this.power;}//獲得子彈的殺傷力
public?int?getX(){return?this.bullet_x;}//獲得子彈的X坐標
public?void?setX(int?x){this.bullet_x=x;}//設置子彈的X坐標
public?int?getY(){return?this.bullet_y;}//獲得子彈的Y坐標
public?void?setY(int?y){this.bullet_y=y;}//設置子彈的Y坐標
public?void?drawBullet(Graphics?g){//繪制子彈的方法?
Color?c=g.getColor();//獲得畫筆的顏色
g.setColor(Color.BLACK);//設置畫筆顏色為黑色
g.fillOval(bullet_xbullet_y1010);//繪制子彈
g.setColor(c);//還原畫筆的顏色
}
public?Rectangle?getRec(){//獲得子彈所在的矩形
return?new?Rectangle(bullet_xbullet_y1010);
}
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件?????????76??2008-09-13?11:32??chap09\build\Client.bat

?????文件???????1045??2008-07-18?10:30??chap09\build\ico.gif

?????文件?????????76??2008-09-13?11:32??chap09\build\Server.bat

?????文件???????1799??2008-08-08?10:59??chap09\build\wyf\cgq\Bullet.class

?????文件???????3369??2008-08-10?11:52??chap09\build\wyf\cgq\ClientAgentThread.class

?????文件???????6443??2008-08-12?15:42??chap09\build\wyf\cgq\ClientWar.class

?????文件????????598??2008-08-09?10:01??chap09\build\wyf\cgq\CPaintThread.class

?????文件????????596??2008-08-09?09:26??chap09\build\wyf\cgq\PaintThread.class

?????文件???????2751??2008-08-10?12:16??chap09\build\wyf\cgq\ServerAgentThread.class

?????文件???????1162??2008-08-13?09:46??chap09\build\wyf\cgq\ServerThread.class

?????文件???????8692??2008-08-12?15:42??chap09\build\wyf\cgq\ServerWar.class

?????文件???????4150??2008-08-12?20:23??chap09\build\wyf\cgq\Tank.class

?????文件???????1041??2008-08-12?20:34??chap09\build\wyf\cgq\TankClient$1.class

?????文件???????5760??2008-08-12?20:34??chap09\build\wyf\cgq\TankClient.class

?????文件???????1160??2008-08-13?09:46??chap09\build\wyf\cgq\TankServer$1.class

?????文件???????5774??2008-08-13?09:46??chap09\build\wyf\cgq\TankServer.class

?????文件???????1255??2008-08-08?11:25??chap09\build\wyf\cgq\WarMap.class

?????文件???????1045??2008-07-18?10:30??chap09\res\ico.gif

?????文件???????2318??2008-08-08?10:01??chap09\src\wyf\cgq\Bullet.java

?????文件???????4012??2008-08-10?11:52??chap09\src\wyf\cgq\ClientAgentThread.java

?????文件???????8186??2008-08-12?15:42??chap09\src\wyf\cgq\ClientWar.java

?????文件????????431??2008-08-09?10:01??chap09\src\wyf\cgq\CPaintThread.java

?????文件????????441??2008-08-09?09:26??chap09\src\wyf\cgq\PaintThread.java

?????文件???????2538??2008-08-10?12:16??chap09\src\wyf\cgq\ServerAgentThread.java

?????文件???????1226??2008-08-13?09:46??chap09\src\wyf\cgq\ServerThread.java

?????文件??????13362??2008-08-12?15:42??chap09\src\wyf\cgq\ServerWar.java

?????文件???????5764??2008-08-12?20:34??chap09\src\wyf\cgq\Tank.java

?????文件???????6486??2008-08-12?20:34??chap09\src\wyf\cgq\TankClient.java

?????文件???????6550??2008-08-13?09:46??chap09\src\wyf\cgq\TankServer.java

?????文件???????1312??2008-08-12?20:34??chap09\src\wyf\cgq\WarMap.java

............此處省略11個文件信息

評論

共有 條評論