⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 52812.htm

📁 仔细看吧
💻 HTM
字号:
<link href="./dzs_cs.css" rel="stylesheet" type="text/css" /><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0">      <tr>        <td>&nbsp;</td>      </tr>      <tr>        <td height="24" align="center" valign="bottom" class="d_font3">使用NetBeans进行游戏移植的解决方案</td>      </tr>      <tr>        <td height="3" bgcolor="#E3E3E3"></td>      </tr>      <tr>        <td>&nbsp;</td>      </tr>      <tr>        <td class="d_font4"><P>游戏在不同的机种之间移植的时候,需要修改的地方通常有美术资源,程序片断。针对这些要求,Netbeans使用Configuration来解决这些问题。每个Configuratio里面相关的属性包括:</P>
<P>1、Platform。对应的机型,模拟器,支持的扩展包等。</P>
<P>2、Abilities。该平台一些属性的描述,比如ScreenSize, ScreenColorDepth, JSRXXX等。这些都是用户定义的,用来描述平台的属性。在预处理片断中使用这些属性。</P>
<P>3、Sources Filter。指定该配置下所使用到的程序。如果把资源也放在src目录下的话,也可以用来指定所需要的资源。</P>
<P>4、Libraries &amp; Resources。指定所需要类库和资源。不同机种的资源经常是不同的。</P>
<P>5、Creating JAR。指定JAD和JAR文件的名称。</P>
<P>在程序代码中,就可以使用下面的预处理指示符:</P>
<P>
<TABLE cellSpacing=0 borderColorDark=#ffffff cellPadding=2 width=400 align=center borderColorLight=black border=1>
<TBODY>
<TR>
<TD class=code bgColor=#e6e6e6><PRE>//#if ScreenSize == "128x160"<BR>int tileWidth = 12; <BR>//#elif ScreenSize == "176x208"<BR>int tileWidth = 16; <BR>//#endif</PRE></TD></TR></TBODY></TABLE></P>
<P>NetBeans会根据Active Configuration把不用的代码注释掉。当使用Build All Project Configurations的时候,就会在dist目录下生成针对每一个Configuration的目录,并把编译好的JAD和JAR文件放到其中。</P>
<P><FONT size=4>【相关文章】</FONT></P>
<UL type=disc>
<LI><A href="http://developer.51cto.com/art/200611/35464.htm" target=_blank><U><FONT color=blue>NetBeans 4.1致力于开发开放源代码移动设备程序</FONT></U></A></LI></UL>
<UL type=disc>
<LI><A href="http://developer.51cto.com/art/200601/19731.htm" target=_blank><U><FONT color=blue>NetBeans 4.0创建J2ME手机RSS阅读器</FONT></U></A></LI></UL>
<UL type=disc>
<LI><A href="http://developer.51cto.com/art/200703/41566.htm" target=_blank><U><FONT color=blue>NetBeans 6完全支持Ruby</FONT></U></A></LI></UL>
<DIV align=right>【责任编辑:<A class=ln href="mailto:sunsj@51cto.com">火凤凰</A> TEL:(010)68476606-8036】</DIV></td>      </tr>      <tr>        <td class="d_font4">&nbsp;</td>      </tr>    </table>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -