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

正文內(nèi)容

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

2025-02-14 14:47 本頁(yè)面
 

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