锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲宅男天堂在线观看无病毒,亚洲国产精品无码久久一区二区 ,亚洲日本在线看片http://www.tkk7.com/liltos/category/14367.htmlzh-cnFri, 02 Mar 2007 02:37:39 GMTFri, 02 Mar 2007 02:37:39 GMT60J2ME鐨勪竴鐐圭瑪璁?/title><link>http://www.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://www.tkk7.com/liltos/articles/65091.html</guid><wfw:comment>http://www.tkk7.com/liltos/comments/65091.html</wfw:comment><comments>http://www.tkk7.com/liltos/articles/65091.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.tkk7.com/liltos/comments/commentRss/65091.html</wfw:commentRss><trackback:ping>http://www.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://www.tkk7.com/liltos/aggbug/65091.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/liltos/" target="_blank">鏉庡父榛?/a> 2006-08-22 15:53 <a href="http://www.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://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://xzzkf.com" target="_blank">国产精品免费_区二区三区观看</a>| <a href="http://hxpc28.com" target="_blank">亚洲av乱码一区二区三区香蕉 </a>| <a href="http://pjszlw.com" target="_blank">亚洲高清无码专区视频</a>| <a href="http://woaisouluo.com" target="_blank">一级毛片不卡免费看老司机</a>| <a href="http://pc521.com" target="_blank">亚洲国产精品久久久久婷婷老年</a>| <a href="http://gdjiayou.com" target="_blank">色窝窝免费一区二区三区</a>| <a href="http://louqibang.com" target="_blank">日本一区二区在线免费观看 </a>| <a href="http://554ka.com" target="_blank">免费一级毛片在线播放放视频</a>| <a href="http://www-282555.com" target="_blank">亚洲精品乱码久久久久久按摩 </a>| <a href="http://tzfzs.com" target="_blank">亚洲AV无码一区东京热久久</a>| <a href="http://hnqkzj.com" target="_blank">中文字幕无码成人免费视频</a>| <a href="http://otkaxap.com" target="_blank">亚洲欧美在线x视频</a>| <a href="http://www2626cf.com" target="_blank">亚洲ⅴ国产v天堂a无码二区</a>| <a href="http://baocaoluoli.com" target="_blank">久久这里只有精品国产免费10</a>| <a href="http://www8x5188x.com" target="_blank">2022免费国产精品福利在线</a>| <a href="http://www-60060.com" target="_blank">性xxxx黑人与亚洲</a>| <a href="http://hqwgg.com" target="_blank">中文字幕亚洲图片</a>| <a href="http://www-070755.com" target="_blank">亚洲人成电影网站免费</a>| <a href="http://www1688mz.com" target="_blank">a视频免费在线观看</a>| <a href="http://taobaohuopin.com" target="_blank">亚洲色成人网站WWW永久四虎 </a>| <a href="http://nit8.com" target="_blank">亚洲熟妇丰满xxxxx</a>| <a href="http://023439.com" target="_blank">亚洲AV无码一区二区三区系列</a>| <a href="http://zjpcyh.com" target="_blank">18禁超污无遮挡无码免费网站国产 </a>| <a href="http://igo98.com" target="_blank">国产精品免费αv视频</a>| <a href="http://billtsssrvp.com" target="_blank">亚洲一级特黄特黄的大片</a>| <a href="http://aaaaa123.com" target="_blank">久久久青草青青国产亚洲免观 </a>| <a href="http://6006284.com" target="_blank">亚洲成人国产精品</a>| <a href="http://41xjj.com" target="_blank">91嫩草国产在线观看免费</a>| <a href="http://cdessc.com" target="_blank">a级成人免费毛片完整版</a>| <a href="http://xianfeng-motor.com" target="_blank">亚洲免费综合色在线视频</a>| <a href="http://yy6653.com" target="_blank">久久综合图区亚洲综合图区</a>| <a href="http://chinashineway.com" target="_blank">亚洲av福利无码无一区二区</a>| <a href="http://jastrelax.com" target="_blank">欧美色欧美亚洲另类二区</a>| <a href="http://3589006.com" target="_blank">蜜臀91精品国产免费观看</a>| <a href="http://ac839.com" target="_blank">亚洲精品国产高清在线观看</a>| <a href="http://91ptv.com" target="_blank">五月天婷婷免费视频</a>| <a href="http://xiaoduanfa.com" target="_blank">国产一级高清视频免费看</a>| <a href="http://583s.com" target="_blank">国产乱辈通伦影片在线播放亚洲 </a>| <a href="http://k96d.com" target="_blank">毛片a级毛片免费播放下载</a>| <a href="http://57gt.com" target="_blank">中文国产成人精品久久亚洲精品AⅤ无码精品</a>| <a href="http://sitefmns.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>