1

对于非视网膜使用此代码请帮助如何在 ipad 中制作视网膜显示

<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="21" height="16" tilewidth="49"  tileheight="48">
 <tileset firstgid="1" name="FirstLevel-ipad" tilewidth="49" tileheight="48">
  <image source="FirstLevel-ipad.png" width="256" height="256"/>
  <tile id="0">
   <properties>
    <property name="Award" value=""/>
   </properties>
  </tile>
  <tile id="1">

对于视网膜我试过

<?xml version="1.0" encoding="UTF-8"?>
<map version="1.0" orientation="orthogonal" width="21" height="16" tilewidth="98" tileheight="96">
 <tileset firstgid="1" name="FirstLevel-ipadhd" tilewidth="98" tileheight="96">
  <image source="FirstLevel-ipadhd.png" width="512" height="512"/>
  <tile id="0">
   <properties>
    <property name="Award" value=""/>
   </properties>

项目相关代码

_tileMap = [CCTMXTiledMap tiledMapWithTMXFile:@"FifthLevel.tmx"];
            [self addChild:_tileMap];
            _objectLayer = [_tileMap layerNamed:@"Objects"];
            _dynamicLayer = [_tileMap layerNamed:@"Dynamic"];
            //_coinsLayer = [_tileMap layerNamed:@"Coins"];
            _keyLayer = [_tileMap layerNamed:@"Key"];
            _shadowLayer = [_tileMap layerNamed:@"Shadow"];
            _blastedLayer =[_tileMap layerNamed:@"Blasted"];
4

1 回答 1

1

在此,问题在于您的地图宽度,它大于最大支持宽度 2048。您可以在日志中检查此错误。

Retina 显示器支持的最大 TMX 映射大小为2048*2048

于 2013-06-21T09:18:29.800 回答