设置球员头像和俱乐部标志
如果需要设置球员头像和俱乐部标志,您需要编辑config.xml文件来让图片和它的位置对应起
来,以便游戏运行时可以准确的找到图片。
下面就是一个典型的config.xml文件:
<record>
<!-- resource manager options -->
<!-- dont preload anything in this folder -->
<boolean id="preload" value="false"/>
<!-- turn off auto mapping -->
<boolean id="amap" value="false"/>
<!-- logo mappings -->
<!-- the following XML maps pictures inside this folder into other positions
in the resource system, which allows this folder to be dropped into any
place in the graphics folder and still have the game pick up the graphics files
from the correct places
-->
<list id="maps">
<record from="filename" to="graphics/pictures/person/4354374/portrait"/>
</list>
</record>
您只需要集中注意以<record from开始的那部分内容。
这部分内容由您输入,是您在游戏里希望加入的图片文件的名字,以及这个图片在数据库中的
统一链接ID号。
您可以对目标加入不同类型的图片,您在config.xml里做出配置来让它在游戏中按照您的希望
而显示。
这里是您可以使用的不同设置类型的例子。
球员
<record from="filename" to="graphics/pictures/person/4354374/portrait"/>
filename是图片文件的名称,而4354374是您希望链接球员的统一ID号。其他类型与此类似。
俱乐部
<record from="filename" to="graphics/pictures/club/109210/logo"/>
联赛
<record from="filename" to="graphics/pictures/comp/12/logo"/>