freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

android-打飛機游戲-課程設(shè)計論文(編輯修改稿)

2025-02-12 04:30 本頁面
 

【文章內(nèi)容簡介】 PauseConvertStart = false。 } else { (0)。 } } if (() == ) { if (GameState == 0) { ()。 ()。 gameView = new GameView()。 } } (e)。 } @Override public void keyReleased(KeyEvent e) { (e)。 } })。 (null)。 (true)。 } (第三學期課程設(shè)計論文) 15 @Override public void paint(Graphics g) {//在窗體中畫東西 系統(tǒng)自動調(diào)用 if (GameState == 2) { ()。 return。 } if (GameState == 1 amp。amp。 PauseConvertStart) { ()。 = true。 } if((! || !) amp。amp。 isOver) { (g)。 (g)。 isOver =false。 } if ( amp。amp。 ) { (g)。 (g)。 (g)。 if (boom !=null amp。amp。 ) { (g)。 } if() { (g)。 } for (int i = 0。 i ()。 i++) { EnBullet eb = (i)。 if (=700) { (eb)。 } if() { (g)。 } else { (eb)。 } } (第三學期課程設(shè)計論文) 16 if(!) { for (int i = 0。 i ()。 i++) { Enplane ep = (i)。 if() { (g)。 } else { (ep)。 } } } else { (g)。 } for (int i = 0。 i ()。 i++) { Bullet b = (i)。 (enPlane,enBullet,boos2)。 if (=0) {//判斷子彈超出屏幕 (b)。 //把子彈從彈夾中移除 } (g)。 } } if(! || !) { if (!) { (go, 177, 200, this)。 } if (!) { (victory,127, 200, this)。 } ()。 } if() { if() (第三學期課程設(shè)計論文) 17 { } else if (!) { } else { (g)。 (enBullet, enPlane,boos2)。 } } } public static void main(String[] args) { gameView = new GameView()。 } } 類 Plane ( 1)成員變量如表 所示 表 成員變量 成員變量描述 變量類型 成員變量名 飛機坐標 int x,y 飛機生命值 int Hp 窗體對象 GameView gv 工具包 Toolkit tk 飛機圖片 Image plane_img ( 2)方法如表 所示 表 方法 名稱 功能 備注 Plane(int x,int y,int hp) 初始化 fj_x,fj_y, hp 構(gòu)造方法 paint(Graphics g) 畫飛機圖片 getRect() 話矩形框 套住飛機 move(keyEvent e) 移動飛機 (第三學期課程設(shè)計論文) 18 ( 3) plane 效果 及代碼 package 。 import 。 import 。 import 。 import 。 public class Plane extends Thread { public int x。 public int y。 public int time。 public boolean isLife。 public GameView gv。 private boolean u, d, l, r, f。 public int moveState。 // 0:不移動 1:up 2:down 3: left 4: right 5: left up public int life。 public int fireSpeed = 3。 public boolean isHit = false。 public Plane(int x, int y, boolean isLife, GameView gv, int life) { = x。 = y。 = life。 = isLife。 (第三學期課程設(shè)計論文) 19 = gv。 } public void hit(EnBullet enBullets, Enplane enPlanes,Boos boos) { if (().intersects(getRec()) amp。amp。 ) { 。 if ( = 0) { = false。 } life。 = new Boom(x, y, true, gv)。 isHit = true。 if (life = 0) { = false。 } = new Boom(, , true, gv)。 (this)。 = + 。 } for (int i = 0。 i ()。 i++) { EnBullet eb = (i)。 if (().intersects(getRec())) { life。 = new Boom(x, y, true, gv)。 isHit = true。 if (life = 0) { = false。 } = new Boom(x, y, true, gv)。 = new Boom(, , true, gv)。 = false。 (this)。 } } for (int i = 0。 i ()。 i++) { Enplane ep = (i)。 if (().intersects(getRec())) { life。 = new Boom(x, y, true, gv)。 = + 。 isHit = true。 if (life = 0) { = false。 (第三學期課程設(shè)計論文) 20 } = new Boom(, , true, gv)。 = false。 (this)。 } } } public void keyRepre(KeyEvent e) { int code = ()。 switch (code) { case : // 向上移動 case : u = false。 break。 case : // 向下移動 case : d = false。 break。 case : // 向左移動 case : l = false。 break。 case : // 向右移動 case : r = false。 break。 case KeyEvent. 向左上移動 f = false。 break。 } } public void keyPre(KeyEvent e) { int code = ()。 switch (code) { case : case : u = true。 break。 case : case : l = true。 break。 case : case : (第三學期課程設(shè)計論文) 21 d = true。 break。 case : case : r = true。 break。 case : f = true。 break。 } } public void move() { if (u) { y = 15。 if (y = 23) { y = 0 + 23。 } } if (d) { y += 15。 if (y = 700 (gv)) { y = 700 (gv)。 } } if (l) { x = 15。 if (x = 0) { x = 0。 } } if (r) { x += 15。 if (x = 700 (gv)) { x = 700 (gv)。 } } if (f) { if () { time = 0。 fireSpeed += 2。 = false。 } time++。 if (time % fireSpeed == 0) { (第三學期課程設(shè)計論文) 22 fire()。 } } } public void fire() { Bullet bullet = new Bullet(, , isLife, gv)。 ()。 (bullet)。 } public void draw(Graphics g) { (, x, y, gv)。 move()。 } public Rectangle getRec() { return new Rectangle(x, y, 150, 150)。 } } 類 Bullet ( 1)成 員變量(表 ) 表 變量描述 類型 成員變量名 子彈坐標 int x,y 子彈圖片 Image bullet 窗體對象 GameView gv ( 2)方法(表 ) 表 名稱 功能 備注 Bullet(int x,int y,GameView m) 初始化子彈出現(xiàn)的位置 構(gòu)造方法 getRect() 畫矩形框 為子彈添加外套 paint(Graphics g) 畫子彈 ( 3) Bullet 效果及代碼 (第三學期課程設(shè)計論文) 23 package 。 im
點擊復(fù)制文檔內(nèi)容
電大資料相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1