Universal cocos2d game to support iPad3

﹥>﹥吖頭↗ 提交于 2019-12-04 09:23:55

The correct way in cocos2d (version 2.0 or 1.1beta) is this:

Normal iPhone:

image.png

Retina iPhone:

image-hd.png

Normal iPad:

image-ipad.png

Retina iPad:

image-ipadhd.png

You must just call image.png in your code, then the code will detect what device is and use the file properly.

I beleive that it goes something like this:

Normal iPhone:

image.png

Retina iPhone:

image.png-hd

Normal iPad:

image.png-ipad

Retina iPad:

image.png-hd-ipad

Do not use @2x instead of -hd because you will find that you will get some errors.

I guess that'll work exactly as you would name ressource to support retina display on iOS (for iPhone). Which to my mind is :

  • MyFile.png is the standard resolution
  • Myfile@2x.png is the resolution for retina display
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!