支持iPad3的通用cocos2d游戏 [英] Universal cocos2d game to support iPad3

查看:21
本文介绍了支持iPad3的通用cocos2d游戏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为 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.

这篇关于支持iPad3的通用cocos2d游戏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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