什么是可用的文件后缀的Cocos2D,用于多分辨率支持? [英] What exactly is the available file suffixes for Cocos2D, used for multi resolution support?

查看:144
本文介绍了什么是可用的文件后缀的Cocos2D,用于多分辨率支持?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在搜索一段时间,但很难找到一个可用的后缀的定义列表,您可以使用多分辨率支持,如果有任何?也就是说,根据您所使用的设备在一个维度中加载图片。特别是对于界面。



我知道-hd后缀存在ipad retina显示支持,但除此之外,如果有任何后缀,



我尝试过使用像-ipad和-iphone这样的后缀,但它们似乎不被识别。



任何人都有提示如何实现这一点?

解决方案

您需要使用cocos2d v1.1或v2.0。然后,您可以在cocos2d支持的资源(图片,tilemaps,位图字体,粒子效果)上使用这些扩展:




  • iPod Retina)

  • -ipad(iPad 1& 2)

  • -ipadhd(iPad Retina)



    • CCFileUtils 类具有允许您使用不同后缀并启用/禁用自动回退到下一个较低分辨率资产的方法。



      早期cocos2d版本仅支持-hd,在大多数版本中不支持-ipad后缀,因为它在很长一段时间内只能在单独的github分支中使用。 -ipadhd后缀是相当新的,在cocos2d v1.1和v2.0中引入。



      此时没有Mac Retina显示器的特殊后缀。


      I've been searching around for a while, but it's been hard to find a definit list of available suffixes which you can use for multi resolution support, if there is any? That is, loading images in a dimension depending on what device you're on. Especially for the interface.

      I know that the "-hd" suffix exists for ipad retina display support, but besides that it would also be nice if there is any suffix for regular iPad resolution as well as an iPhone suffix when the game is loaded on an iPhone.

      I've tried using suffixes like "-ipad" and "-iphone", but they do not seem to be recognized.

      Anyone have tips on how this can be achieved, if at all?

      解决方案

      You need to be using cocos2d v1.1 or v2.0. Then you can use these extensions on assets supported by cocos2d (images, tilemaps, bitmap fonts, particle effects):

      • -hd (iPhone/iPod Retina)
      • -ipad (iPad 1 & 2)
      • -ipadhd (iPad Retina)

      The CCFileUtils class has methods that allow you to use different suffixes and enable/disable automatic fallback to the next lower resolution assets.

      Earlier cocos2d versions support only -hd, with the -ipad suffix not supported in most versions because it was for a long time only available in a separate github branch. The -ipadhd suffix is fairly new, introduced in cocos2d v1.1 and v2.0.

      At this time there is no special suffix for Mac Retina displays.

      这篇关于什么是可用的文件后缀的Cocos2D,用于多分辨率支持?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆