2013-06-28 49 views

回答

1

看起来像它的时候,从cocos2d的头文件的另一个copypaste!

CCSpriteFrameCache.h

/** Removes unused sprite frames. 
* Sprite Frames that have a retain count of 1 will be deleted. 
* It is convinient to call this method after when starting a new Scene. 
*/ 
-(void) removeUnusedSpriteFrames; 

/** Removes multiple Sprite Frames from a plist file. 
* Sprite Frames stored in this file will be removed. 
* It is convinient to call this method when a specific texture needs to be removed. 
* @since v0.99.5 
*/ 
- (void) removeSpriteFramesFromFile:(NSString*) plist; 
0

removeSpriteFramesFromFile:

从plist文件中删除多个雪碧帧。存储在此文件中的Sprite帧将被删除。当需要删除特定纹理时,调用此方法很方便。

removeUnusedSpriteFrames:

删除未使用的精灵帧。 Sprite保留计数为1的帧将被删除。启动新场景后调用此方法很方便。