支持iPad3的通用cocos2d游戏游戏、cocos2d

由网友(清澈如初)分享简介:如何为 ipad & 命名图像资源?通用应用程序中的 ipad HD 版本?How would the image resources be named for the ipad & ipad HD versions in a universal app?当支持 iphone 的普通和高清图像时,我们使用 imag...

如何为 ipad & 命名图像资源?通用应用程序中的 ipad HD 版本?

How would the image resources be named for the ipad & ipad HD versions in a universal app?

当支持 iphone 的普通和高清图像时,我们使用 imageName.png &imageName-hd.png.但是,如果我做一个通用的假设我必须重命名图像并使用 imageNameiPad.png &imageNameiPad-hd.png?

When supporting normal and HD images for iphone we use imageName.png & imageName-hd.png. But if I make an universal am I right in assuming that I would have to rename the images and use imageNameiPad.png & imageNameiPad-hd.png?

请告诉我命名约定是如何工作的.

Please let me know how the naming convention works.

谢谢阿比纳夫

推荐答案

cocos2d(2.0或1.1beta版)中正确的做法是这样的:

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

普通 iPhone:

图像.png

视网膜 iPhone:

图像-hd.png

普通 iPad:

image-ipad.png

image-ipad.png

视网膜 iPad:

图像-ipadhd.png

image-ipadhd.png

您必须只在代码中调用 image.png,然后代码将检测设备是什么并正确使用该文件.

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

阅读全文

相关推荐

最新文章