xperienced / cocos2d-resourceloader

Raúl Uranga helped to finally upload this small utility to Github and here comes his repo fork!

Home Page:http://xperienced.com.pl/blog/how-to-preload-your-game-assets-in-loading-scene

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Works with the latest version of Cocos2D.

##Usage

// load resources
ResourcesLoader *loader = [ResourcesLoader sharedLoader];
NSArray *extensions = [NSArray arrayWithObjects:@"png", @"wav", nil];

for (NSString *extension in extensions) {
	NSArray *paths = [[NSBundle mainBundle] pathsForResourcesOfType:extension inDirectory:nil];
	for (NSString *filename in paths) {
		filename = [[filename componentsSeparatedByString:@"/"] lastObject];
		[loader addResources:filename, nil];
	}
}

// load it async
[loader loadResources:self];

About

Raúl Uranga helped to finally upload this small utility to Github and here comes his repo fork!

http://xperienced.com.pl/blog/how-to-preload-your-game-assets-in-loading-scene


Languages

Language:Objective-C 90.6%Language:C 8.6%Language:C++ 0.7%