IOS Cocos2d Get CCSpriteFrame from Cache
/* Get Frame from Cache */
+ (CCSpriteFrame*) getFrameFromCache:(NSString*) plistfile image:(NSString*) frameName {
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:plistfile];
return [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:frameName];
}
+ (CCSpriteFrame*) getFrameFromCache:(NSString*) plistfile image:(NSString*) frameName {
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:plistfile];
return [[CCSpriteFrameCache sharedSpriteFrameCache] spriteFrameByName:frameName];
}
Comments
Post a Comment