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

正文內(nèi)容

基于android平臺的2048手機游戲開發(fā)設(shè)計與實現(xiàn)(編輯修改稿)

2025-02-14 14:47 本頁面
 

【文章內(nèi)容簡介】 長梅,于復(fù)興等. Android入門經(jīng)典[M].北京:機械工業(yè)出版社,2013,130~134.[4] 楚無咎. Android開發(fā)游戲大全[M].北京:電子工業(yè)出版社,2013,23~25,82!~84,160~163.[5] Ian . Android開發(fā)游戲大全[M].北京:機械工業(yè)出版社,2013,290~297,333~334.[6] 一輝. Android布局詳解之一:FrameLayout. ,20110819 /20141225.[7] 益智小游戲. 2048網(wǎng)頁游戲. ,20140826 /20141220.[8] flyfish. 手機游戲. ,20140320 /20141221.[9] springhi2009. Android中的Handler總結(jié) . ,20100726 /20141225.[10] zyq0335. activity之間的數(shù)據(jù)傳遞方法 . ,20120606 /20141225.電子科技大學(xué)中山學(xué)院畢業(yè)設(shè)計(論文) 附錄附錄 游戲?qū)崿F(xiàn)代碼/** * 用于獲取移動方向上下一個格子的位置 * @param index 當(dāng)前格子的位置 * @param direction 滑動方向 * @return 如果在邊界在返回1 */ public int getNext(int index,int direction){ int y = index/4。 int x = index%4。 if(x==3 amp。amp。 direction==RIGHT) return 1。 if(x==0 amp。amp。 direction==LEFT) return 1。 if(y==0 amp。amp。 direction==UP) return 1。 if(y==3 amp。amp。 direction==DOWN) return 1。 return index+direction。 } /** * 用于獲取移動方向上前一個格子的位置 * @param index 當(dāng)前格子的位置 * @param direction 滑動方向 * @return 如果在邊界在返回1 */ public int getBefore(int index,int direction){ int y = index/4。 int x = index%4。 if(x==0 amp。amp。 direction==RIGHT) return 1。 if(x==3 amp。amp。 direction==LEFT) return 1。 if(y==3 amp。amp。 direction==UP) return 1。 if(y==0 amp。amp。 direction==DOWN) return 1。 return indexdirection。 } /** * 該方法用來交換當(dāng)前格與目標(biāo)空白格的位置 * @param thisIdx 當(dāng)前格子的坐標(biāo) * @param nextIdx 目標(biāo)空白格的坐標(biāo) */ public void replace(int thisIdx, int nextIdx){ moved = true。 //獲取當(dāng)前格子的view,并將其置成空白格 View thisView = (thisIdx)。 ImageView image = (ImageView) ()。 (icons[0])。 //獲取空白格的view,并將其背景置成當(dāng)前格的背景 View nextView = (nextIdx)。 ImageView nextImage = (ImageView) ()。 (icons[(thisIdx)])。 //在空白格列表中,去掉目標(biāo)格,加上當(dāng)前格 ((nextIdx))。 (thisIdx)。 //在數(shù)字格列表中,當(dāng)前格的坐標(biāo)置換成目標(biāo)格的坐標(biāo) (thisIdx, nextIdx)。 }/** * 剛方法用于合并在移動方向上兩個相同的格子 * @param thisIdx 當(dāng)前格子的坐標(biāo) * @param nextIdx 目標(biāo)格子的坐標(biāo) */ public void levelup(int thisIdx, int nextIdx){ //一次移動中,每個格子最多只能升級一次 if(!(nextIdx)){ moved = true。 //獲取當(dāng)前格子的view,并將其置成空白格 View thisView = (thisIdx)。 ImageView image = (ImageView) ()。 (icons[0])。 //獲取目標(biāo)格的view,并將其背景置成當(dāng)前格升級后的背景 View nextView = (nextIdx)。 ImageView nextImage = (ImageView) ()。 (icons[(nextIdx)+1])。 //在空白格列表中加入當(dāng)前格 (thisIdx)。 //在數(shù)字列中刪掉第一個格子 (thisIdx)。 //將數(shù)字列表對應(yīng)的內(nèi)容升級 (nextIdx)。 (nextIdx)。 //更新分數(shù) updateScore((int)(2, (nextIdx)))。 } }/** * 該方法,為每個符合條件的格子執(zhí)行變動的操作,如置換,升級等 * @param thisIdx 當(dāng)前格子的坐標(biāo) * @param direction 滑動方向 */ public void Change(int thisIdx,int direction){ if((thisIdx)){ int nextIdx = getLast(thisIdx, direction)。 if(nextIdx == thisIdx){ //不能移動 return。 }else if((nextIdx)){ //存在可以置換的空白格 replace(thisIdx,nextIdx)。 }else{ if((thisIdx) == (nextIdx)){ //可以合并 levelup(thisIdx, nextIdx)。 }else{ int before = getBefore(nextIdx, direction)。 if(before != thisIdx){ //存在可以置換的空白格 replace(thisIdx,before)。 } } } } }/** * 用于獲取移動方向上最后一個空白格之后的位置 * @param index 當(dāng)前格子的坐標(biāo) * @param direction 移動方向 * @return */ public int getLast(int thisIdx, int direction){ int nextIdx = getNext(thisIdx, direction)。 if(nextIdx 0) return thisIdx。 else{ if((nextIdx)) return getLast(nextIdx, direction)。 else return nextIdx。 } }/** * 該方法為不同的滑動方向,執(zhí)行不同的遍歷順序 * @param direction 滑動方向 */ public void move(int direction){ moved = false。 ()。 switch(direction){ case RIGHT: for(int y=0。y4。y++){ for(int x=2。x=0。x){ int thisIdx = 4*y +x。 Change(thisIdx,direction)。 } } break。 case LEFT: for(int y=0。y4。y++){ for(int x=1。x=3。x++){ int thisIdx = 4*y +x。 Change(thisIdx,direction)。 } } break。 case UP: for(int x=0。x4。x++){ for(int y=1。y=3。y++){ int thisIdx = 4*y +x。 Change(thisIdx,direction)。 } } break。 case DOWN: for(int x=0。x4。x++){ for(int y=2。y=0。y){ int thisIdx = 4*y +x。 Change(thisIdx,direction)。 } } break。 } //如果本次滑動有格子移動過,則隨機填充新的格子 if(moved) addRandomItem()。 History history = new History(spaceList, numberList, score)。 (history)。 (歷史軌跡壓入棧中 )。 ()。 if(()==0){ if(!()) over()。 } }/** * 根據(jù)參數(shù)重繪界面 * @param spaceList 空白格列表 * @param numberList 數(shù)字格列表 * @param score 當(dāng)前分數(shù) */ public void drawViews(ListInteger spaceList, NumberList numberList, int score){ (score+)。 ()。 for(int i=0。 i16。 i++){ View view = (this, , null)。 ImageView image = (ImageView) ()。 if((i)) (icons[(i)])。 else (icons[0])。 (view)。 } }致謝此論文能夠順利完成,離不開給予我無私幫助的老師、同學(xué)、家人,以及網(wǎng)上為我解答困惑的網(wǎng)友們。感謝我的導(dǎo)師,宋喜佳老師,雖然接觸的時間不是很長,但是在學(xué)習(xí)Android程序的路上給了我無私的關(guān)懷和指導(dǎo)。由于未接觸過Java相關(guān)知識,在開發(fā)Android程序時處處碰壁,遇到需求,不能及時反應(yīng)出解決方案,只有不斷地求助于我的導(dǎo)師——宋喜佳老師,給了功能設(shè)計思路,讓我成功地克服一個又一個的困難。在此,謹向送老師表示衷心的敬意和感謝。同時,非常感謝我的室友李朗和劉雨坤,在論文編寫和畢業(yè)設(shè)計的制作過程中,給予我鼓勵和關(guān)懷,提出了許多寶貴意見和建議,再次深表感謝。最后,特別感謝我的家人,感謝他們在精神上和物質(zhì)上給予我無私的鼓勵和支持,使我能夠順利完成論文,和學(xué)業(yè),我將永記他們的付出并用一生來回報他們。 摘 要在科技文化高速發(fā)展的今天,人們對電子游戲娛樂的需求也日益高漲。從最初的運行于掌上游戲機的“貪吃蛇”和“俄羅斯方塊”到如今風(fēng)靡全世界的網(wǎng)游無不體現(xiàn)了游戲的魅力。而隨著智能手機終端的涌現(xiàn),更是為電子游戲提供了高速發(fā)展的平臺。特別是iPhone智能手機和Android智能手機的面世,為掌上休閑游戲與應(yīng)用提供了更完善的的開發(fā)環(huán)境。本論文主要闡述以面向?qū)ο蟮某绦蜷_發(fā)語言Java及Eclipse為開發(fā)工具,而基于智能手機Android系統(tǒng)之上的飛機大戰(zhàn)游戲。首先簡要介紹課題的研究背景、目的及意義,Android的發(fā)展歷程、當(dāng)前國內(nèi)外的發(fā)展現(xiàn)狀。然后介紹了Android平臺開發(fā)環(huán)境及環(huán)境搭建,最后講述了基于Android飛機大戰(zhàn)游戲功能的實現(xiàn)。其功能模塊如下:提供敵機的類模塊,提供子彈的類模塊,主界面模塊,天空背景模塊,檢測子彈與敵機碰撞模塊,檢測,敵機與我擁有的戰(zhàn)機碰撞木塊等,除此以外還為用戶提供更加人性化的設(shè)計和方便人員的操作流程。由于Android逐漸成為智能手機技術(shù)的主導(dǎo),相信其基于Android的飛機大戰(zhàn)游戲?qū)艿礁蟮臍g迎。關(guān)鍵詞: 安卓;游戲;飛行射擊;飛機Abstract(英文摘要)In the culture of science and technology rapid development today, the people of electronic games and entertainment
點擊復(fù)制文檔內(nèi)容
環(huán)評公示相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖片鄂ICP備17016276號-1