2014-04-08 2 views
0

Xcode에서 실제로 전체 프로젝트를로드 할 수있는로드 스크린을 만들고 싶습니다. 나는 지금 어떻게해야할지 모른다. 당신이 도울 수 있기를 바랍니다.스프라이트 키트 게임의 로딩 화면을 만드는 방법

+0

먼저 프로젝트를로드해야합니다. 그런 다음 1 초 이상 걸리면 로딩 화면에서 작업을 시작할 수 있습니다. – Fogmeister

+0

장면을 만들고 장면에 스프라이트를 넣습니다. 나는 그것보다는 더 많은 것을 추측한다. 어떻게해야 할 지 모르는가? – LearnCocos2D

답변

1

하나 또는 여러 개의 SKTextureAtlas를로드하는 것과 관련이 있다고 생각합니다. 그렇다면 다음 코드를 시도해보십시오.

NSLog(@"start loading..."); 
SKTextureAtlas *atlas1 = [SKTextureAtlas atlasNamed:MyAtlas_1]; 
SKTextureAtlas *atlas2 = [SKTextureAtlas atlasNamed:MyAtlas_2]; 
SKTextureAtlas *atlas3 = [SKTextureAtlas atlasNamed:MyAtlas_3]; 
[SKTextureAtlas preloadTextureAtlases:[NSArray arrayWithObjects: atlas1, atlas2, atlas3, nil] withCompletionHandler:^{ 
     NSLog(@"loading done..."); 
     // loading is done so do whatever you need to here... 
    }]; 
관련 문제