2013-04-23 1 views
0

내가 이미지 확장이 나는 같은 사용 적인 Cocos2D는 -/

을 -widehd.png하지만 내 게임에서 작동하지 않습니다와 현재적인 Cocos2D 2.1 및 지원 아이폰 5 위의 생각 작동하지 -widehd - 와이드와 아이폰 5 지원 기본. 그냥적인 Cocos2D에서 검색이 기본 지원 아이폰 5를적인 Cocos2D 지금 표시 CCFileUtils.h

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

이러한 발견했다. 왜 나를 위해 일하지 않니?

+0

프로젝트에 RetinaSupport를 사용 설정 했습니까? – samfisher

+0

그래 .. 심지어 나는 wide.png를 배치했다. 작품 정확한 iPad, iPadhd – Guru

+1

정확히 어떤 버전입니까, 2.1 rc1입니까? 정확히 "작동하지 않는다"는 것은 무엇을 의미합니까? 기대 대 출력? – LearnCocos2D

답변

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)