锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲宅男天堂在线观看无病毒,亚洲国产精品无码久久一区二区 ,亚洲日本在线看片http://m.tkk7.com/liltos/category/14367.htmlzh-cnFri, 02 Mar 2007 02:37:39 GMTFri, 02 Mar 2007 02:37:39 GMT60J2ME鐨勪竴鐐圭瑪璁?/title><link>http://m.tkk7.com/liltos/articles/65091.html</link><dc:creator>鏉庡父榛?/dc:creator><author>鏉庡父榛?/author><pubDate>Tue, 22 Aug 2006 07:53:00 GMT</pubDate><guid>http://m.tkk7.com/liltos/articles/65091.html</guid><wfw:comment>http://m.tkk7.com/liltos/comments/65091.html</wfw:comment><comments>http://m.tkk7.com/liltos/articles/65091.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/liltos/comments/commentRss/65091.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/liltos/services/trackbacks/65091.html</trackback:ping><description><![CDATA[鍛借繍璺熸垜寮浜嗕竴鍦虹帺絎戯紝涓涓笉鍠滄寰堝娓告垙鐨勪漢錛屽嵈鍐欒搗浜嗘父鎴忋傘傘?br />鍙傚姞宸ヤ綔涓庡湪瀛︽牎錛屾湁涓鐐逛笉鍚屾槸錛氭槸鍚︿負寮鴻揩鎬х殑鈥斺斿浜庡伐浣滐紝鍗充嬌浣犱笉鍠滄錛屽悓鏍瘋鍋氥?br />鏃㈢劧鍦ㄥ仛錛岄偅灝卞緱灝藉姏鍋氾紝姣忎釜浜洪兘搴旇濡傛銆?br />鍔姏鎬濊冿紝瀛︿範銆?br />絎旇榪樻槸瑕佸仛鐨勶細<br /><br />絎旇涓錛?br />鍙戠墝紼嬪簭錛屽紼嬪簭鍛樻潵璇達紝鍙戠墝鐨勮繃紼嬪彧鏄竴涓皢鏈潵鎺掑ソ搴忕殑鏁扮粍鐨勯『搴忔墦涔辮屽凡錛岃繖涓柟娉曡嶇殑鍙槸涓涓皬鑱槑錛屼嬌寰?Random.nextInt() 鏂規硶鐨勮繍琛屾鏁板彧絳変簬鐗岀殑鏁伴噺<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">聽1</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽2</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@author</span><span style="color: rgb(0, 128, 0);">聽liltos<br /></span><span style="color: rgb(0, 128, 128);">聽3</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽length聽瑕佸彂鐨勭墝鏁?br /></span><span style="color: rgb(0, 128, 128);">聽4</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽<br /></span><span style="color: rgb(0, 128, 128);">聽5</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽闅忔満鍙戠墝鐨勭▼搴忥紝瀹冪殑鐗圭偣鍦ㄤ簬鍙憀ength寮犵墝鐨勮瘽<br /></span><span style="color: rgb(0, 128, 128);">聽6</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽鍙榪愯length嬈andom.nextInt()鏂規硶錛?br /></span><span style="color: rgb(0, 128, 128);">聽7</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽紼嬪簭涓殑4涓猣or寰幆錛屾湁2涓敤浜庤緭鍑猴紝1涓敤浜庢暟緇勭殑鍒濆鍖?br /></span><span style="color: rgb(0, 128, 128);">聽8</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽鍙湁涓涓猣or寰幆鏄敤浜庡彂鐗岀殑<br /></span><span style="color: rgb(0, 128, 128);">聽9</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">10</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">static</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">聽randomDeliverCard(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽length)聽{<br /></span><span style="color: rgb(0, 128, 128);">11</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">[]聽card1聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">[length];<br /></span><span style="color: rgb(0, 128, 128);">12</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">[]聽result聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">[length];<br /></span><span style="color: rgb(0, 128, 128);">13</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">14</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽card1.length;聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)<br /></span><span style="color: rgb(0, 128, 128);">15</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽card1[i]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">16</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽card1.length;聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽{<br /></span><span style="color: rgb(0, 128, 128);">17</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽System.out.print(card1[i]聽</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\t</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">18</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽((i聽</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">)聽</span><span style="color: rgb(0, 0, 0);">%</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">9</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /></span><span style="color: rgb(0, 128, 128);">19</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.out.println();<br /></span><span style="color: rgb(0, 128, 128);">20</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">21</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">22</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽Random聽rand聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽Random(System.currentTimeMillis());<br /></span><span style="color: rgb(0, 128, 128);">23</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">24</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽rand_index聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">25</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽remain聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽card1.length;<br /></span><span style="color: rgb(0, 128, 128);">26</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">27</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">/*</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">28</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽聽聽聽聽*聽褰撳皢rand_index涓婄殑鏁板彇鍑哄悗錛屼負闃叉鍐嶆鍙栧埌璇ユ暟錛?br /></span><span style="color: rgb(0, 128, 128);">29</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽聽聽聽聽*聽渚垮皢鏁扮粍鏈熬鐨勬暟濉厖鍒拌浣嶇疆涓婏紝騫跺皢鏁扮粍鏈熬鐨勬爣蹇梤emain鍑?<br /></span><span style="color: rgb(0, 128, 128);">30</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽聽聽聽聽*聽鑰屼笅鏍囬殢鏈烘暟鐨勫彇鍊間竴鐩存槸鍦╮emain鑼冨洿涔嬪唴鐨?br /></span><span style="color: rgb(0, 128, 128);">31</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">32</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽card1.length;聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽{<br /></span><span style="color: rgb(0, 128, 128);">33</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽rand_index聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽Math.abs(rand.nextInt()聽</span><span style="color: rgb(0, 0, 0);">%</span><span style="color: rgb(0, 0, 0);">聽remain);<br /></span><span style="color: rgb(0, 128, 128);">34</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽result[i]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽card1[rand_index];<br /></span><span style="color: rgb(0, 128, 128);">35</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽card1[rand_index]聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽card1[remain聽</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">];<br /></span><span style="color: rgb(0, 128, 128);">36</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽remain</span><span style="color: rgb(0, 0, 0);">--</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">37</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">38</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">39</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽System.out.println(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\n\n</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">40</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽result.length;聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽{<br /></span><span style="color: rgb(0, 128, 128);">41</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽System.out.print(result[i]聽</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\t</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">42</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽((i聽</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">)聽</span><span style="color: rgb(0, 0, 0);">%</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">10</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">==</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">)<br /></span><span style="color: rgb(0, 128, 128);">43</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽System.out.println();<br /></span><span style="color: rgb(0, 128, 128);">44</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">45</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}</span></div><br />絎旇浜岋細<br />鍒濆鍖栦竴涓?TiledLayer 鍦板浘錛屼竴鑸儏鍐典笅鐨?TiledLayer 鍦板浘鍙槸涓涓簩緇存暟緇勶紝榪欎釜鏂規硶鍙槸灝嗚繖涓簩緇存暟緇勬紜湴杞寲鎴愭湡鏈涚殑鍦板浘銆?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">聽1</span>聽<span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽2</span>聽<span style="color: rgb(0, 128, 0);">聽*聽@parm聽array聽浠h〃鍦板浘鐨勬暟緇?br /></span><span style="color: rgb(0, 128, 128);">聽3</span>聽<span style="color: rgb(0, 128, 0);">聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽4</span>聽<span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">聽initMap(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">[][]聽array)聽{<br /></span><span style="color: rgb(0, 128, 128);">聽5</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽map聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽TiledLayer(array[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">].length,聽array.length,聽image,聽w,聽h);<br /></span><span style="color: rgb(0, 128, 128);">聽6</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽array.length;聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽{<br /></span><span style="color: rgb(0, 128, 128);">聽7</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽j聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽j聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽array[</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">].length;聽j</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽{<br /></span><span style="color: rgb(0, 128, 128);">聽8</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽map.setCell(j,聽i,聽array[i][j]);<br /></span><span style="color: rgb(0, 128, 128);">聽9</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">10</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">11</span>聽<span style="color: rgb(0, 0, 0);">}</span></div>榪欎釜鏂規硶鐨勫叧閿箣澶勫湪浜庤皟鐢?鏋勯犳柟娉曞拰 setCell() 鏂規硶鏃跺墠涓や釜鍙傛暟鐨勯『搴忋?br /><br />絎旇涓夛細<br />鍏充簬涓涓狫2ME紼嬪簭鐨勬鏋訛紝鍦ㄧ涓嬈″啓J2ME鐨勬父鎴忔椂錛屽彧鏄劅瑙変竴澶撮浘姘淬備笅闈㈣繖涓槸鎬葷粨鐨勪竴鐐圭偣涓滀笢錛?br /><br />MIDlet<br />銆銆GameCanvas gameCanvas;<br />銆銆GameThread gameThread;//濡傛灉鏈夊叾瀹冪殑涓浜涗簨鎯?鍙互鍦ㄦ瀹氫箟鏇村鐨勭嚎紼?騫跺湪 startApp() 鏂規硶鍐呭惎鍔ㄧ嚎紼?br />銆銆Display display;<br /><br />銆銆startApp(){<br />銆銆銆銆gameThread.start();<br />銆銆銆銆display.setCurrent(gameCanvas);//濡傛灉鏈夊繀瑕?鍙互璋冩暣鏄劇ず瀵硅薄<br />銆銆}<br />銆撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱?br />GameCanvas<br />銆銆LayerManager layerManager;<br /><br />銆銆GameCanvas(){<br />銆銆銆銆super(false);<br />銆銆銆銆layerManager = new LayerManager(this);<br />銆銆}<br /><br />銆銆paint(Graphics g){<br />銆銆銆銆switch(gameState){<br />銆銆銆銆銆銆case GAMING:<br />銆銆銆銆銆銆銆銆layerManager.paint(g, x_view, y_view);<br />銆銆銆銆}<br />銆銆}<br /><br />銆銆refresh(){<br />銆銆銆銆layerManager.refresh();<br />銆銆銆銆zepaint();<br />銆銆}<br /><br />銆銆doKeyEvent(){<br />銆銆銆銆int keyState = this.getKeyStates();<br />銆銆銆銆switch(gameState){<br />銆銆銆銆銆銆case GAMING:<br />銆銆銆銆銆銆銆銆layerManager.doKeyEvent(keyState);<br />銆銆銆銆銆銆銆銆break;<br />聽聽聽聽聽聽聽聽聽聽聽 case ...:(other state)<br />銆銆銆銆銆銆銆銆//鐢婚潰鍙樺寲涓嶅ぇ/闈炴父鎴忕姸鎬佷笅,璋冪敤鏈被鐨勪簨浠跺鐞嗘柟娉?br /> 銆銆銆銆銆銆銆銆break;<br />銆銆銆銆}<br />銆銆}<br /><br />銆銆zepaint(){<br />銆銆銆銆paint(g);<br />銆銆銆銆flushGraphics();<br />銆銆}<br /><br />銆銆澶勭悊闈欐鐢婚潰鍦ㄦ湰綾諱腑<br /><br />銆撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱?br />聽LayerManager<br />銆銆GameCanvas gameCanvas;<br /><br />銆銆LayerManager(GameCanvas gameCanvas){}<br /><br />銆銆refresh(){<br />銆銆銆...refresh sprites...<br />銆銆}<br /><br />銆銆doKeyEvent(int key){<br />銆銆銆銆switch(key){<br />銆銆銆銆銆銆case ...:<br />銆銆銆銆銆銆銆銆handle data;<br />銆銆銆銆}<br />銆銆}<br /><br />銆銆paint(Graphics g, int x, y){<br />銆銆銆銆super();<br />銆銆銆...paint sprites...<br />銆銆}<br />聽 寰堝紼嬪簭浼氬彧璋冪敤 append(Layer) 鏂規硶鑰屼笉閲嶈澆鐖剁被鐨?paint(Graphics, int, int) 鏂規硶錛屽悓鏍峰彲浠ュ疄鐜版父鎴忎腑鐨勭粯鐢誨姛鑳姐傝屽綋鐢ㄧ殑鏄?TiledLayer 浣滆儗鏅椂錛屾垜榪樹笉鐭ラ亾濡傛灉閲嶈澆璇ユ柟娉?-_-! 鏈川涓婃槸瀵瑰潗鏍囩郴鐨勮璇嗕笉娓?<br />銆撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱撱?br />GameThread<br />銆銆GameCanvas gameCanvas;<br />銆銆GameThread(GameCanvas gameCanvas){}<br />銆銆run(){<br />銆銆銆銆while(true){<br />銆銆銆銆銆銆gameCanvas.doKeyEvent();<br />銆銆銆銆銆銆gameCanvas.refresh();<br />銆銆銆銆銆銆Thread.sleep(100);<br />銆銆銆銆}<br />銆銆}<br />------------------------<br />銆銆榪欏彧鏄垜涓鑸▼搴忛噷鐨勬鏋訛紝鍙笉鏄妗嗘灦錛屼絾浠庢垜鎺ヨЕ榪囩殑鏉ョ湅錛岃繖涓鏋惰繕鏄瘮杈冪粡鍏哥殑銆?br /><br />銆銆濡傛鐨勭瑪璁板笇鏈涜鍒漢鑳藉鐪嬫噦銆?br /><img src ="http://m.tkk7.com/liltos/aggbug/65091.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/liltos/" target="_blank">鏉庡父榛?/a> 2006-08-22 15:53 <a href="http://m.tkk7.com/liltos/articles/65091.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://m.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://saohu533.com" target="_blank">日韩精品免费视频</a>| <a href="http://hzsprfm.com" target="_blank">亚洲va久久久噜噜噜久久男同</a>| <a href="http://xj47777.com" target="_blank">国产福利免费观看</a>| <a href="http://2002tw.com" target="_blank">亚洲黄黄黄网站在线观看</a>| <a href="http://c7vl.com" target="_blank">亚洲女同成av人片在线观看</a>| <a href="http://bjtjchem.com" target="_blank">亚洲精品国产第1页</a>| <a href="http://46339cc.com" target="_blank">亚洲AV无码男人的天堂</a>| <a href="http://jkc178.com" target="_blank">日本高清不卡aⅴ免费网站</a>| <a href="http://bjmyhfc.com" target="_blank">4hu四虎最新免费地址</a>| <a href="http://199291.com" target="_blank">亚洲Av无码国产情品久久</a>| <a href="http://2c06xyz.com" target="_blank">久久精品亚洲精品国产色婷</a>| <a href="http://zhidianzh.com" target="_blank">亚洲一区二区三区国产精华液</a>| <a href="http://zhaofeiz.com" target="_blank">丁香六月婷婷精品免费观看</a>| <a href="http://www55nana.com" target="_blank">久久久久久国产精品免费无码</a>| <a href="http://bentuxinli.com" target="_blank">在线观看人成网站深夜免费</a>| <a href="http://xian66.com" target="_blank">丝袜熟女国偷自产中文字幕亚洲</a>| <a href="http://ytshdiping.com" target="_blank">亚洲午夜国产精品</a>| <a href="http://4922000.com" target="_blank">一级毛片免费在线观看网站</a>| <a href="http://ee45987.com" target="_blank">色老头永久免费网站</a>| <a href="http://yw323.com" target="_blank">亚洲日韩VA无码中文字幕</a>| <a href="http://qihongxia.com" target="_blank">亚洲三级在线视频</a>| <a href="http://czdlglass.com" target="_blank">中文字幕免费观看视频</a>| <a href="http://my637.com" target="_blank">久久久久国产精品免费免费搜索</a>| <a href="http://xxzyyj.com" target="_blank">国产亚洲美女精品久久久</a>| <a href="http://12345ww.com" target="_blank">亚洲视频一区二区三区四区</a>| <a href="http://usagaa.com" target="_blank">99精品视频在线观看免费</a>| <a href="http://whyandroid.com" target="_blank">成全视频免费高清</a>| <a href="http://otkaxap.com" target="_blank">久久久久亚洲AV片无码下载蜜桃</a>| <a href="http://vcnxa.com" target="_blank">四虎一区二区成人免费影院网址 </a>| <a href="http://41xjj.com" target="_blank">久久综合九九亚洲一区</a>| <a href="http://3bmmatv.com" target="_blank">www亚洲精品久久久乳</a>| <a href="http://zgdhuibao.com" target="_blank">久久国产精品一区免费下载</a>| <a href="http://wwwby1385.com" target="_blank">免费永久在线观看黄网站</a>| <a href="http://www5xsq.com" target="_blank">亚洲成人福利在线观看</a>| <a href="http://9aiba.com" target="_blank">99视频在线观看免费</a>| <a href="http://bet06966.com" target="_blank">国产hs免费高清在线观看</a>| <a href="http://ziniurj.com" target="_blank">亚洲国产成人在线视频 </a>| <a href="http://yytengsheng.com" target="_blank">毛片在线全部免费观看</a>| <a href="http://455zx.com" target="_blank">免费又黄又爽又猛的毛片 </a>| <a href="http://zndijgch.com" target="_blank">亚洲国产成人在线视频</a>| <a href="http://hzczj.com" target="_blank">久久精品国产大片免费观看</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>