Hi all,
why addSpriteFramesWithFile can’t use in the thread? My images were great,I must load them in thread.
_eg:
- (void)loadResourceWithName {
[NSThread detachNewThreadSelector:`selector(startLoadInThread) toTarget:self withObject:nil];
} - (void)startLoadInThread {
[_pCondition lock];
NSAutoreleasePool* pPool = [[NSAutoreleasePool alloc] init];
CCSpriteFrameCache* cache = CCSpriteFrameCache::sharedSpriteFrameCache();
cache -> addSpriteFramesWithFile(strPlistName.c_str());
[self performSelectorOnMainThread:`selector(finishLoad) withObject:nil waitUntilDone:NO];
[pPool release];
[_pCondition unlock];
}