1

所以我创建了一个CCSpriteSheet

_spriteSheet = [[CCSpriteSheet spriteSheetWithFile:@"deuximages2.png" capacity:2] retain];
[[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@"deuximages2.plist"];

在另一种方法中:

 mangeur = [CCSprite spriteWithSpriteFrameName:@"mangeurcentremieu_03.png"];

但我有警告:CCSpriteSheet is deprecated.我认为我必须替换它,CCSpriteBatchNode但我不知道该怎么做。

4

1 回答 1

2

CCSpriteBatchNode的接口与CCSpriteSheet. 我记得CCSpriteBatchNode是在 0.99.5 中引入来替换CCSpriteSheet.

_batchNode = [[CCSpriteBatchNode batchNodeWithFile:@"deuximages2.png" capacity:2] retain];
于 2012-04-24T07:00:40.457 回答