【正文】
usually there was an officer on the seat w ith the driver and more officers in the back seat. They splashed more mud than the camions even and if one of the officers in the bac k was very small and sitting between two generals, he himself so small that you could not see his face but only the top of his cap and his narrow bac k, and if the car went especially fast it was probably the King. He lived in Udine and came out in this way nearly every day to see how things were going, and things went very badly. At the start of the winter came the permanent rain and with the rain came the cholera. But it was checked and in the end only seven thousand died of it in the army. ERNEST HEMINGWAY was born in Oak Park, Illinois, in 1899, and began his writing career for _The Kansas City Star_ in 1917. During the First World War he volunteered as an ambulance driver on the Italian front but was invalided home, having been seriously wounded while serving with the infantry. In 1921 He mingway settled in Paris, where he became part of the expatriate circle of Gertrude Stein, F. Scott Fitzgerald, Ezra Pound, and Ford Madox Ford. His first book, _Three Stories and Ten Poems_, was publ ished in Paris in 1923 and was followed by the short story selection _In Our Time_, which marked his American debut in 1925. With the appearance of _The Sun Also Rises_ in 1926, Hemingway became not only the voice of the lost generation but the preeminent writer of his time. This was followed by _Men Without Women_ in 1927, when Hemingway returned to the United States, and his novel of the Italian front, _A Farewell to Arms_ (1929). In the 1930s, Hemingway settled in Key West, and later in Cuba, but he traveled widely to Spain, Italy, and Africaand wrote about his experiences in _Death in the Afternoon_ (1932), his classic treatise on bullfighting, and _Green Hills of Africa_ (1935), an account of biggame hunting in Africa. Later he reported on the Spanish Civil War, which became the background for his brilliant war novel, _For Whom the Bell Tolls_ (1939), hunted Uboats in the Caribbean, and covered the E uropean front during the Second World War. Hemingway39。 除非另有科研合同和其他法律文書(shū)的制約,本論文的科研成果屬于成都信息工程學(xué)院。 ( 2)學(xué)校可以采用影印、縮印或其他復(fù)制方式保存學(xué)位論文。在此向他表示我最衷心的感謝! 感謝韓斌老師初期給予的幫助,在韓斌老師的幫助下課題才得以很好的展開(kāi),有了一個(gè)很好的開(kāi)端! 在論文完成過(guò)程中,本人還得到了其他老師和許多同學(xué)的熱心幫助,本人向他們表示深深的謝意! 最后向在百忙之中評(píng)審本文的各位專家、老師表示衷心的感謝! 作者簡(jiǎn)介 姓 名:王偉 性別:男 出生年月: 民族:漢 Email: 第 22 頁(yè) 共 23 頁(yè) 聲 明 本論文的工作是 2021 年 2 月至 2021 年 6 月在成都信息工程學(xué)院網(wǎng)絡(luò)工程系完成的。 [4] 施錚 .J2ME技術(shù)參考手冊(cè) [M].北京:電子工業(yè)出版社 ,2021。 這款游戲算是休閑類的一款小游戲,如果能繼續(xù)完善游戲的菜單功能,增加游戲可玩性等,那這款游戲?qū)?huì)是一款比較具有人氣的手機(jī)游戲。 通過(guò)對(duì)“沙丘魔堡 ” 這個(gè)手機(jī)游戲的構(gòu)想,設(shè)計(jì),代碼的編寫(xiě)和調(diào)試,我進(jìn)一步學(xué)習(xí)了 J2ME 這個(gè)平臺(tái),并對(duì)手機(jī)游戲編程有了新認(rèn)識(shí)。 這樣就實(shí)現(xiàn)了游戲的暫停(掛起)功能。 關(guān)于游戲畫(huà)面的顯示問(wèn)題 在后期測(cè)試中發(fā)現(xiàn)游戲在暫停后繼續(xù)游戲時(shí),游戲畫(huà)面又恢復(fù)為游戲開(kāi)始的畫(huà)面,而不是暫停時(shí)的游戲畫(huà)面,經(jīng)過(guò)多次調(diào)試后發(fā)現(xiàn)問(wèn)題在 MyGameCanvas 類。我們精靈中重寫(xiě)的 collidesWith()方法來(lái)檢測(cè)它們之間的碰撞檢測(cè),這個(gè)時(shí)候我們就存在一個(gè)怎么樣判斷與小球碰撞的是哪個(gè)磚塊的問(wèn)題。 精靈與精靈之間的碰撞檢測(cè)可以直接 調(diào)用 Sprite類中的 collidesWith()方法或者自己重新 Sprite 類中的 collidesWith()方法并調(diào)用來(lái)進(jìn)行碰撞檢測(cè)。游戲中的聲音我們用的 startPlayer 方法來(lái)播放。該類的主要功能為使用 Media API 播放游戲中的聲音效果:背景音樂(lè)和游戲結(jié)束的提示音。 } } } 通過(guò)查看背景數(shù)組和玩家坐標(biāo),來(lái)實(shí)現(xiàn)和背景的碰撞檢測(cè)。 10 + Length * i = y + () amp。 } //右下 if( Length * j = x +() 3 amp。amp。 10 + Length *(i + 1) = y + ()/2) { (Length * j () ,())。 Length *(j + 1) = x + () –1 amp。amp。amp。amp。amp。 i 20。參考點(diǎn)由 defineReferencePixel 函數(shù)確定 未翻轉(zhuǎn)圖片狀態(tài)時(shí)的坐標(biāo)。每個(gè)小圖按照其排列順序有相應(yīng)的序號(hào),在程序中調(diào)用其序號(hào),就可以繪制出相應(yīng)的圖片。 玩家精靈 GamePlayer 類的實(shí)現(xiàn) Sprite 類是繼承自 Layer 的用于存儲(chǔ)多幀的基本可視元素。 判斷是否按下暫停 while(ispause) 調(diào)用按鍵方法 INPUT_KEY()。 ()。 } catch(Exception e){} // init_Game()。 ((,_LARGE))。 }}} if(isEndGame) //判斷是否贏得游戲 { if(!islose) { EedGameTime = ()。 flushGraphics()。 (0,0,getWidth(),getHeight())。 et = ()。 INPUT_KEY()。 isKey = true。 try { (1000)。 (255,255,0)。stage = 4。 程序的 run 方法: public void run() { long st = 0。 GameCanvas 類提供 了基本的游戲用戶接口。 游戲畫(huà)布 MyGame 類的實(shí)現(xiàn) 在 J2ME 游戲編程中, Canvas 類是最常用的類之一,該類提供了獲得手機(jī)屏幕屬性、繪制界面以及事件處理等很多實(shí)用的功能。 case MY_ABOUT: (())。 case MY_HELP: (())。 case MY_GAME: (())。 final public static int MY_SET = 6。 final public static int MY_GAME = 2。 } public void exit() { ()。 記錄存儲(chǔ)是面向記錄的數(shù)據(jù)庫(kù),可把一個(gè)記錄存儲(chǔ)看作一個(gè)數(shù)據(jù)庫(kù)文件,由許多記錄組合而成,這些記錄將持久保存并支持跨多個(gè) MIDlet 的請(qǐng)求。 } //將畫(huà)面設(shè)為主畫(huà)面 MAIN SCREEN new Thread(this).start()。 }catch(Exception e) { (―添加數(shù)據(jù)失敗 ‖)。 byte tem[] = ()。 其中,特別是第二個(gè)作用使用的更加頻繁。 Display 類有兩個(gè)最主要的作用: 獲得屏幕的屬性。 RecordName = ―GameRMS‖。游戲的流程如圖 4 所示: 圖 4 游戲的流程圖 游戲的實(shí)現(xiàn) 游戲一共實(shí)現(xiàn)了幾個(gè)類,包括用于游戲外部的、菜單類、排行榜屏幕類、聲音設(shè)置屏幕類、結(jié)束屏幕類,以及用于游戲本身的游戲畫(huà)布類、聲音效果類。初始情況下,游戲菜單有 5 個(gè)選項(xiàng),它們分別是開(kāi)始游戲、游戲說(shuō)明和排行榜、設(shè)置、關(guān)于。 7. PlayMusic 類 —— 用于實(shí)現(xiàn)音樂(lè)的播放。 3.菜單類 —— 游戲中菜單事件的處理。 ( 5)關(guān)于 —— 用來(lái)顯示說(shuō)明信息以及背景圖片。 具體實(shí)現(xiàn)的功能為: 1.主菜單,有如下選項(xiàng): ( 1)開(kāi)始游戲 —— 進(jìn)入游 戲界面。這時(shí)我們只是模仿之前在 PC 上看到的游戲,用語(yǔ)言把游戲的實(shí)現(xiàn)感性的描述為幾大部分: 游戲界面系統(tǒng):包括游戲開(kāi)始界面;游戲開(kāi)局界面;游戲運(yùn)行界面;游戲結(jié)束界面。殺死他們的同時(shí)還可以獲得各種獎(jiǎng)勵(lì),加生命,加血等,增加了游戲的趣味性。 當(dāng)前的最新 Release 的版本為 J2ME 。當(dāng)前的手機(jī)游戲產(chǎn)業(yè)盡管仍然存在很多制約其發(fā)展的瓶頸,但手機(jī)游戲已顯示出非比尋常的發(fā)展速度,其市場(chǎng)潛力十分巨大,將成為移動(dòng)增值服務(wù)市場(chǎng)新的增長(zhǎng)點(diǎn)。 手機(jī)游戲業(yè)務(wù) 手機(jī)游戲是移動(dòng)多媒體時(shí)代最有價(jià)值的應(yīng)用。其他的系統(tǒng),如在Compaq的 iPaq上已經(jīng)實(shí)現(xiàn)了 CDC, IBM的 WebSphere Micro Environment在 Pocket PC 上實(shí)現(xiàn)了 CLDC, CDC 和 MIDP。而正在制定中的 PDA Profile則定義了針對(duì) PDA的 API,其屏幕,內(nèi)存條件都要大于 MIDP,但是網(wǎng)絡(luò)方面的要求則顯然和手機(jī)有所不同。為此,在 Configuration 的基礎(chǔ)上,根據(jù)設(shè)備具體功能再進(jìn)行一次劃分,比如智能手機(jī), PDA 等等。作為 Java 平臺(tái)必須保證相容性,這就必須舍棄所有的設(shè)備特殊性。 第 4 頁(yè) 共 23 頁(yè) 計(jì)算能力是這兩類設(shè)備的主要區(qū)別,對(duì)其上可能的應(yīng)用和環(huán)境顯然有著本質(zhì)影響,不同類別的設(shè)備不可能采用同樣的 Java 平臺(tái),必須分別定義。 Sun對(duì) J2ME 有一個(gè)很好的概括: J2ME技術(shù)有兩個(gè)設(shè)計(jì)中心 —— 手持的設(shè)備,和可以插到墻上插座的設(shè)備。 因 為 MIDP 提出的比較早,目前重要的智能手機(jī)和 PDA 操作系統(tǒng)上都已有了相應(yīng)的實(shí)現(xiàn),而且應(yīng)用的也比較廣泛。 Configuration 提供了基本的語(yǔ)言