亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? game.java

?? 經典的五星級縱版平面飛行射擊游戲
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
             	       }
                	}
                }
                if (bs.islive) { bs.move();}//未擊中的子彈繼續移動
             }
             else {BBv.remove(i);}//清除擊中的子彈
          }
          //處理爆炸s
          for (int i = 0 ; i < BOMBv.size() ; i++)
          {
          	 Bomb bombs;
          	 bombs = (Bomb) BOMBv.elementAt(i);
          	 if (bombs.islive){ bombs.grow();}
          	 else { BOMBv.remove(i);}
          }
          //處理敵機子彈是否擊中
          for (int i = 0 ; i < EBv.size() ; i++)
          {
          	 EB ebs;
          	 ebs = (EB) EBv.elementAt(i);
          	 ebs.hit(hero_x,hero_y);
          	 //消除無效子彈
          	 if ( ebs.islive 
          	      && ebs.y > -10 && ebs.y < a.y - 10 
          	      && ebs.x > 0 && ebs.x < a.x - 10)
          	 { ebs.move();}
          	 else if (!ebs.islive) 
          	 { System.out.println("hit you"); EBv.remove(i);hero_hp -= 10;}
          	 else 
          	 { EBv.remove(i);}
          }
          cont++;
          if (cont%3 == 0)
          { 
            if (isfire){ BBmove(BBx,BBy);} 
            if (seq == 0) { seq = 1;}
            else { seq = 0;}
          cont = 0;               
          }
          repaint();    
          try
          {
             Thread.sleep(20);    
          }
          catch(Exception E){ }
          if(y == 0) {y = 0;}
          else {y++;}
       }
   }
   
    public void BBmove(int x, int y)
    {
    	 BB bs;
		   	 bs = new BB (x,y);
		     //保證不出屆
		     if (BBx >= (a.x - 75)){ BBx = a.x - 75;}
		     if (BBy >= (a.y - 150)){ BBy = a.y - 150;}
		     BBv.add(bs);
    }

	public void mouseDragged(MouseEvent e) 
	{
		isfire = true;
		BBx = hero_x + 10;
		BBy = hero_y;
		
		hero_x = e.getX() - 35;
		hero_y = e.getY() - 35;
		//保證不出屆
		if (BBx >= (a.x - 75)){ BBx = a.x - 75;}
		if (BBy >= (a.y - 150)){ BBy = a.y - 150;}
		if (BBx < 25){ BBx = 25;}
		if (BBy < 25){ BBy = 25;}
        //限速
		if ((hero_x - hero_oldx) > 15 ){ hero_x = hero_oldx + 15;};
		if ((hero_x - hero_oldx) < -15 ){ hero_x = hero_oldx - 15;};
		if ((hero_y - hero_oldy) > 15 ){ hero_y = hero_oldy + 15;};
		if ((hero_y - hero_oldy) < -15 ){ hero_y = hero_oldy - 15;};	
		//保證不出屆
		if (hero_x >= (a.x - 70)){ hero_x = a.x - 70;}
		if (hero_y >= (a.y - 120)){ hero_y = a.y - 120;}
		if (hero_x < 0){ hero_x = 0;}
		if (hero_y < 0){ hero_y = 0;}
		//if ((hero_oldx - hero_x) > 3){dir = 1;}
		//else if ((hero_x - hero_oldx) > 3){dir = 2;}
		//else {dir = 0;}
		hero_oldx = hero_x;
		hero_oldy = hero_y;
	
    }

	public void mouseMoved(MouseEvent e) 
	{
	    hero_x = e.getX() - 35;
		hero_y = e.getY() - 35;
	    //保證不出屆
		if (hero_x >= (a.x - 70)){ hero_x = a.x - 70;}
		if (hero_y >= (a.y - 120)){ hero_y = a.y - 120;}
		if (hero_x < 0){ hero_x = 0;}
		if (hero_y < 0){ hero_y = 0;}
		//限速
		if ((hero_x - hero_oldx) > 15 ){ hero_x = hero_oldx + 15;};
		if ((hero_x - hero_oldx) < -15 ){ hero_x = hero_oldx - 15;};
		if ((hero_y - hero_oldy) > 15 ){ hero_y = hero_oldy + 15;};
		if ((hero_y - hero_oldy) < -15 ){ hero_y = hero_oldy - 15;};
		//判斷方向
	    //if ((hero_oldx - hero_x) > 10){dir = 1;}
		//else if ((hero_x - hero_oldx) > 10){dir = 2;}
		//else {dir = 0;}
		//改值
		hero_oldx = hero_x;
		hero_oldy = hero_y;
	}
    
	public void mouseClicked(MouseEvent e) 
	{   }

	public void mousePressed(MouseEvent e) 
	{
		/////////////////////////////////////////////////////////
		//如果GAMEOVER可以重新開始 
		  if (hero_hp < 0)
		{
			if (this.Game_star != null)
			{
				this.Game_star.stop();
				this.Game_star = null;
			}
			this.Game_star = new Thread(this);
			Game_star.start();
			Game_star.setPriority(7);
		    y = - (5*a.y);
		    hero_x = a.x/2 - 35;
		    hero_y = a.y - 85;
		    hero_oldx = hero_x;
		    hero_oldy = hero_y;
		    hero_hp = 200;
		    seq = 0;
		    dir = 0;
		    Sum = 0;
		    E_num = 0;
		    E_max = 9;
		    E_vel = 7;
		    E_mov = 90;
		    E_hit = 97;
		    isfire = false;
		    EEv.removeAllElements();
		    BBv.removeAllElements();
		    EBv.removeAllElements();
		    BOMBv.removeAllElements();
		}
		///////////////////////////////////////////////////////////////////////	
		else
		{
		  isfire = true;
		  BBx = hero_x+10;
		  BBy = hero_y;
		  //保證不出屆
		  //保證不出屆
		  if (BBx >= (a.x - 75)){ BBx = a.x - 75;}
		  if (BBy >= (a.y - 150)){ BBy = a.y - 150;}
		  if (BBx < 25){ BBx = 25;}
		  if (BBy < 25){ BBy = 25;}
		}
    }

	public void mouseReleased(MouseEvent e) 
	{
		isfire = false;
	}

	public void mouseEntered(MouseEvent e) 
	{
		// TODO: Add your code here
	}

	public void mouseExited(MouseEvent e) 
	{
		// TODO: Add your code here
	}
}

//物體類
class BB //子彈類
{
  int x;
  int y;
  int v;//速度
  int cont;//生命周期
  boolean islive = true ;
  BB(int x,int y)
  {
  	this.x = x;
  	this.y = y;
  	this.v = 10;
  	this.cont = 0;
  }
  public void move()
  {
  	if (this.cont >= 7)
  	{ this.cont = 0 ;}
  	this.y -= this.v;
  	this.cont++;
  }
  public void hit(int a,int b)
  {
  	 if ( Math.abs((x + 25) - (a + 25)) < 26 && Math.abs((y + 25) - (b + 25)) < 26)
  	      {this.islive = false;}
  	 else {this.islive = true;}
  }  
}
class EE //敵兵類
{
  int x;
  int y;
  int r;//幾率
  int f;//開火幾率
  int vx;//速度
  int vy;//速度
  int cont;//生命周期
  boolean islive = true ;
  boolean toleft = false ;
  boolean toright = false ;
  EE(int x,int vy,int r,int f)
  {
  	this.x = x;
  	this.y = -50;
  	this.vx = 0;
  	this.vy = vy;
  	this.r = r;
  	this.f = f;
  	this.cont = 0;
  }
  // 敵機移動
  public void move(int a)
  {
  	// 一定幾率橫向移動
  	if(Math.random()*100 > r)
  	{
  	   if (a - this.x > 50 && cont == 0) 
  	   {
  	   	  this.vx = 3; 
  	   	  this.toright = true;
  	   	  this.toleft = false;
  	   }
  	   else if (this.x - a > 50 && cont == 0)
  	   {
  	   	  this.vx = -3;
  	   	  this.toright = false;
  	   	  this.toleft = true;
  	   }
  	   this.cont++;
    }
    if (this.cont > 2 )
  	{
  	    this.vx = 0;
  	    this.toright = false;
  	    this.toleft = false;
  	    this.cont = 0;
  	}
  	this.x += this.vx;
  	this.y += this.vy;
  }
  // 敵機開火
   public boolean tofire()
  {
  	// 一定幾率開火
  	if(Math.random()*100 > f){ return true; }  	
  	else { return false;}
  }
  //碰撞檢查
  public void hit(int a,int b)
  {
  	 if ( Math.abs((x + 25) - (a + 25)) < 28 && Math.abs((y + 25) - (b + 25)) < 28)
  	      {this.islive = false;}
  	 else {this.islive = true;}
  }  
}
class EB //敵兵子彈類
{
  int x;
  int y;
  int vx;
  int cont;//生命周期
  int vy;//速度
  boolean islive = true ;
  EB(int x,int y,int a,int b)
  {
  	this.x = x;
  	this.y = y;
  	this.vy = 15;
  	this.cont = 0;
  	if (this.x < a) 
  	   {
  	   	  this.vx = 2; 
  	   }
    else 
  	   {
  	   	  this.vx = -2;
  	   }
  	if (this.y < b) 
  	   {
  	   	  this.vy = 7; 
  	   }
    else 
  	   {
  	   	  this.vy = -7;
  	   }
  }
  public void move()
  {
  	if (this.cont >= 20){ this.cont = 0;}
  	this.cont++;
  	this.y += this.vy;
  	this.x += this.vx;
  }
  public void hit(int a,int b)
  {
  	 if ( Math.abs((x + 10) - (a + 25)) < 28 && Math.abs((y + 10) - (b + 5)) < 28)
  	      {this.islive = false;}
  	 else {this.islive = true;}
  } 
}
class Bomb //敵兵爆炸類
{
  int x;
  int y;
  int cont;
  boolean islive = true ;
  Bomb(int x,int y)
  {
  	this.x = x;
  	this.y = y;
  	this.cont = 0;
  }
  public void grow()
  {
  	if (cont > 61) {this.islive = false;}
  	this.cont ++;
  	this.y ++ ;
  } 
}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
亚洲免费观看高清完整版在线观看 | 久久久国产精品麻豆| 日本视频中文字幕一区二区三区| 欧美日韩免费在线视频| 天天综合天天做天天综合| 欧美一区国产二区| 欧美午夜精品理论片a级按摩| 日本va欧美va瓶| 99精品在线免费| 亚洲乱码国产乱码精品精小说| 一本大道综合伊人精品热热| 一区二区三区欧美视频| 欧美精品久久天天躁| 免费成人在线播放| 国产日韩视频一区二区三区| gogo大胆日本视频一区| 亚洲国产视频直播| 日韩精品一区二区三区蜜臀| 国产成人av影院| 亚洲欧美成人一区二区三区| 欧美精品在线观看播放| 国产在线精品免费av| 日韩毛片高清在线播放| 欧美日本乱大交xxxxx| 国产毛片精品视频| 亚洲精品中文字幕乱码三区| 91麻豆精品91久久久久同性| 国产一区二区福利视频| 亚洲蜜桃精久久久久久久| 欧美一区二区三区的| 国产99久久久久| 亚洲国产精品嫩草影院| 久久午夜色播影院免费高清| 在线视频你懂得一区| 精品一区二区久久| 一区二区三区产品免费精品久久75| 91精品国产麻豆国产自产在线| 高清不卡在线观看av| 日韩和欧美的一区| 国产精品久久久久久久久果冻传媒| 欧美日本免费一区二区三区| 粉嫩绯色av一区二区在线观看| 天天色天天操综合| 国产精品免费av| 日韩一区二区三区av| 在线视频观看一区| 成人一区二区三区视频在线观看 | 美女尤物国产一区| 亚洲日本一区二区| 久久久久久免费网| 91精品婷婷国产综合久久竹菊| 成人午夜激情影院| 国产一区在线不卡| 日韩国产高清影视| 亚洲一区二区欧美激情| 国产精品久久精品日日| 精品国产91九色蝌蚪| 欧美日韩国产精品成人| 在线观看av一区| 成人精品免费网站| 粉嫩高潮美女一区二区三区| 精彩视频一区二区三区| 七七婷婷婷婷精品国产| 亚洲一二三区视频在线观看| 亚洲欧洲成人精品av97| 亚洲精品一区在线观看| 欧美一区二区三级| 69堂成人精品免费视频| 欧美另类videos死尸| 欧美亚洲日本一区| 91成人看片片| 欧美性色黄大片| 欧美三级午夜理伦三级中视频| 91视视频在线直接观看在线看网页在线看| 国产精品一区专区| 国产aⅴ综合色| 成人黄色电影在线 | 9l国产精品久久久久麻豆| 国产成人鲁色资源国产91色综| 久久精品国产久精国产| 蜜臀久久99精品久久久画质超高清 | 欧美一卡二卡在线观看| 欧美日韩成人综合在线一区二区 | 91视频免费播放| 91香蕉国产在线观看软件| 91一区二区在线| 在线一区二区观看| 精品视频全国免费看| 精品视频免费在线| 日韩你懂的在线播放| 精品久久人人做人人爽| 国产日韩欧美精品一区| 成人免费一区二区三区视频| 亚洲女爱视频在线| 亚洲成人av免费| 久久国产剧场电影| 东方欧美亚洲色图在线| 色网站国产精品| 777午夜精品免费视频| 日韩精品在线一区| 日本一区二区不卡视频| 亚洲视频一区二区免费在线观看| 亚洲视频精选在线| 午夜一区二区三区视频| 日本不卡一二三| 国产99久久精品| 欧美中文字幕亚洲一区二区va在线 | 成人综合在线观看| 欧美一a一片一级一片| 日韩欧美国产精品| 国产精品久久久久aaaa| 婷婷六月综合亚洲| 国产成人无遮挡在线视频| 91麻豆精品一区二区三区| 欧美军同video69gay| 国产日韩欧美精品电影三级在线| 亚洲免费观看高清完整版在线观看熊| 香蕉久久夜色精品国产使用方法| 久久激五月天综合精品| 91猫先生在线| 精品日韩99亚洲| 樱花影视一区二区| 国产高清成人在线| 欧美日韩国产高清一区二区三区 | 国产中文一区二区三区| 色婷婷综合久久久中文一区二区| 欧美一区二区在线观看| 成人欧美一区二区三区1314| 天使萌一区二区三区免费观看| 国产成人午夜视频| 91精品国产免费| 尤物av一区二区| 高清国产一区二区| 欧美一区二区三区视频在线 | 欧美大度的电影原声| 亚洲免费视频成人| 国产精品亚洲午夜一区二区三区| 欧美日韩亚洲国产综合| 国产精品美女久久久久久久久久久| 奇米色一区二区| 欧美日本国产一区| 亚洲精品免费在线| 成人国产精品免费网站| 欧美一区2区视频在线观看| 一区二区视频免费在线观看| 国产不卡视频一区| 欧美成人bangbros| 天堂一区二区在线| 色偷偷久久人人79超碰人人澡| 日本一二三不卡| 国产精品一级在线| 欧美videos中文字幕| 性欧美疯狂xxxxbbbb| 91福利在线看| 亚洲精品视频观看| 91蝌蚪porny九色| 欧美高清在线一区| 国产ts人妖一区二区| xnxx国产精品| 精品一区二区久久| 精品久久久久久久久久久院品网| 免费在线观看一区二区三区| 欧美性大战久久久| 亚洲不卡av一区二区三区| 在线视频欧美区| 亚洲国产视频一区| 欧美日韩在线三级| 性欧美大战久久久久久久久| 欧美曰成人黄网| 亚洲一卡二卡三卡四卡无卡久久| 色综合天天综合色综合av| 自拍偷拍亚洲欧美日韩| 91网站在线播放| 亚洲综合丝袜美腿| 欧美日韩亚洲综合在线| 日韩高清在线不卡| 日韩免费一区二区| 国产麻豆精品theporn| 国产亚洲精品中文字幕| 成人黄色一级视频| 亚洲夂夂婷婷色拍ww47| 欧美日韩国产色站一区二区三区| 亚洲成va人在线观看| 欧美一区二区三级| 国产精品一卡二卡| 亚洲欧美日韩久久精品| 精品视频一区三区九区| 蜜臀av一区二区在线免费观看 | 99久久精品国产导航| 亚洲精品免费在线播放| 666欧美在线视频| 国产美女av一区二区三区| 国产精品不卡在线| 欧美日韩国产在线播放网站| 久国产精品韩国三级视频| 国产三级一区二区三区| 色又黄又爽网站www久久| 午夜精品影院在线观看| 久久久久国产一区二区三区四区| 不卡影院免费观看|