资源简介

利用MVC框架,用SwingUI界面编程,计时器刷新页面,实现坦克坦克,支持单人游戏,双人游戏,含有道具模式,地图编辑器,地图选择,道具购买和使用功能

资源截图

代码片段和文件信息

package control;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.ArrayList;

import model.EnemyTank;
import model.MyBullet;
import view.UI;



public class BulletListener implements ActionListener{
public Control_game gc;
//public ArrayList bullet_list;
public BulletListener(Control_game gc){
this.gc = gc;//获取子弹的链表
}
@Override
public void actionPerformed(ActionEvent e) {
// TODO Auto-generated method stub
//子弹的循环遍历出来运动
for(MyBullet a:gc.bullet_list){
a.move();
UI.star.repaint();
}
//我方道具计时器
//防御道具的计时器
if(gc.mytank.defense_time>0){
gc.mytank.defense_time--;
}else if(gc.mytank.defense_time<=0){
gc.map_time=0;
gc.map();
}
//道具速度计时器
if(gc.mytank.speed_time>0){
gc.mytank.speed_time--;
}else if(gc.mytank.speed_time<=0){
gc.mytank.speed=10;
if(gc.one_two==2){
gc.tank_two.speed=10;
}
}
//道具敌方坦克停止计时器
if(gc.stop_time>0){
gc.stop_time--;
}else if(gc.stop_time<=0){
gc.mytimer.enemytank_timerlistenter.start();
}
}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件        343  2018-03-30 18:03  src\TanKeGame_by_Jxs\.classpath

     文件        392  2018-03-30 18:02  src\TanKeGame_by_Jxs\.project

     文件        598  2018-03-30 18:02  src\TanKeGame_by_Jxs\.settings\org.eclipse.jdt.core.prefs

     文件      15546  2018-04-11 15:46  src\TanKeGame_by_Jxs\bin\666.png

     文件       4737  2018-04-07 11:36  src\TanKeGame_by_Jxs\bin\blood_bag.png

     文件       3740  2018-04-02 11:01  src\TanKeGame_by_Jxs\bin\Boom.png

     文件       9330  2018-03-27 13:59  src\TanKeGame_by_Jxs\bin\chui1.png

     文件       1808  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\BulletListener.class

     文件       3885  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\Control_game.class

     文件       2904  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\CustomListener.class

     文件       2253  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\CustomWindListener.class

     文件       1686  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\EnemyTank_TimerListenter.class

     文件        597  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\Enemy_Tank_BulletTimer.class

     文件       1320  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\GameExit_Or_BlackWindowListener.class

     文件       3537  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\GameIndexListeners.class

     文件       4219  2018-04-13 15:06  src\TanKeGame_by_Jxs\bin\control\GameStarListeners.class

     文件       3698  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\GameTimerListenter.class

     文件       2500  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\Game_DefeatedListenter.class

     文件       2452  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\Game_Make_info_mapLinstener.class

     文件       1171  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\Game_OverPsssLinstenter.class

     文件       3492  2018-04-13 15:02  src\TanKeGame_by_Jxs\bin\control\Game_PassListenter.class

     文件       4753  2018-04-13 15:33  src\TanKeGame_by_Jxs\bin\control\Game_Star_KeyListenter.class

     文件       1509  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\Make_Map_MouseListener.class

     文件       1544  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\MusicPlay.class

     文件       1371  2018-04-13 15:34  src\TanKeGame_by_Jxs\bin\control\MyTimer.class

     文件       2350  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\new_EnemyTankListenter.class

     文件       1724  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\play_key_listenter.class

     文件       1008  2018-04-13 15:01  src\TanKeGame_by_Jxs\bin\control\Props_TimerListenter.class

     文件        697  2018-04-13 15:27  src\TanKeGame_by_Jxs\bin\control\ui_timer_listenter.class

     文件     458625  2018-04-01 10:19  src\TanKeGame_by_Jxs\bin\defeated_bj.jpg

............此处省略218个文件信息

评论

共有 条评论