2013-06-21 52 views
1

非視網膜正在使用此代碼,請幫助如何使視網膜DISPLY在ipad瓦片地圖是不是在視網膜DISPLY加載爲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"]; 
+0

能否請您添加有關,你怎麼加映射到你的項目的一些代碼嗎? – Renaissance

+0

_tileMap = [CCTMXTiledMap tiledMapWithTMXFile:@「FifthLevel.tmx」]; [self addChild:_tileMap]; _objectLayer = [_tileMap layerNamed:@「Objects」]; _dynamicLayer = [_tileMap layerNamed:@「Dynamic」]; _keyLayer = [_tileMap layerNamed:@「Key」]; _shadowLayer = [_tileMap layerNamed:@「Shadow」]; _blastedLayer = [_ tileMap layerNamed:@「Blasted」]; – Raj

+0

結帳這一次:http://stackoverflow.com/questions/12837104/wrong-position-of-tile-map-when-i-convert-to-retina-display/12840642#12840642 – Guru

回答

1

在這裏,問題是你的地圖的寬度,它大於最大支持的寬度是2048.你可以ch在日誌中發現這個錯誤。 TMX地圖在Retina顯示屏的

支持的最大尺寸爲2048 * 2048

+0

我在landSCAPE模式下運行我的遊戲 – Raj

+0

你有沒有在日誌中的錯誤?在哪種模式下運行遊戲並不重要。 – Renaissance

+0

我的日誌中沒有錯誤 – Raj

相關問題