2013-04-23 41 views
0

我相信现在的Cocos2D 2.1和支持iPhone5的上面,图像扩展-widehd.pngcocos2d的 - 默认iPhone5的支持, - 宽/ -widehd不工作

我以前一样,但在我的游戏不工作。最近查询在cocos2d,发现这些在CCFileUtils.h

- iPhone: "" 
- iPhone HD: "-hd" 
- iPhone5 : "-wide" 
- iPhone5 HD: "-widehd" 
- iPad: "-ipad" 
- iPad HD: "-ipadhd" 
- Mac: "" 
- Mac HD: "-machd" 

这表明现在默认的cocos2d支持的iPhone5。为什么不为我工作?

+0

是否启用了RetinaSupport为您的项目? – samfisher 2013-04-23 05:30:15

+0

yes..even我放wide.png也..不工作。适用于iPad,iPadhd – Guru 2013-04-23 05:37:13

+1

,它的确切版本是这个,它是2.1 rc1? “不工作”究竟意味着什么?期望与输出? – LearnCocos2D 2013-04-23 05:50:34

回答

0

在cocos2d 3.0与-iphone5hd工作分机

imageName-iphone5hd.png // For iPhone5 wide screen image 
0

CCFileUtils可以选择在不使用后缀的情况下搜索文件夹中的资源,它比后缀更干净。要做到这一点改变搜索模式由后缀到目录中使用如下代码:

CCFileUtils *sharedFileUtils = [CCFileUtils sharedFileUtils]; 
[sharedFileUtils setSearchMode:kCCFileUtilsSearchDirectoryMode]; 

然后,下列文件夹至少创建一个:

resources-iphone5hd (for iPhone 5 retina resources) 
resources-iphone5 (for iPhone 5 non-retina resources) 
resources-iphonehd (for iPhone retina resources) 
resources-iphone (for iPhone non-retina resources) 
resources-ipadhd (for iPad retina resources) 
resources-ipad (for iPad non-retina resources) 
resources-mac (for OS X resources) 
resources-machd (for OS X retina resources. N/A yet)