私はcocos2dで初心者ですが、Objective-CとiphoneSdkでの経験があります。 私はアプリケーションに問題があります。何がエラーであるのか分かりません。エラーチェンジCCScene
私はCCLayer(アニメ)を持っています。 :
アニメ:私は文字のアニメーションを作成するためにCCSpriteFrameCacheを使用レベルで
-(id) init{
if((self=[super init])) {
CCSpriteFrameCache* frameCache = [CCSpriteFrameCache sharedSpriteFrameCache];
[frameCache addSpriteFramesWithFile:@"Anime.plist"];
CCSprite * backgound = [CCSprite spriteWithSpriteFrameName:@"Back.png"];
backgound.anchorPoint=ccp(0,0);
[self addChild:backgound z:-1];
CCSprite *body = [CCSprite spriteWithSpriteFrameName:@"Body1.png"];
[self addChild:body z:0];
CCSprite *bMoved = [CCSprite spriteWithSpriteFrameName:@"Gigante1.png"];
[self addChild:bMoved z:1];
NSMutableArray *nuvemAnim = [[NSMutableArray alloc] init];
for (int i = 1; i < 41; i++) {
NSString *frameNames = [NSString stringWithFormat:@"Gigante%i.png",i];
[nuvemAnim addObject:[[CCSpriteFrameCache sharedSpriteFrameCache]
spriteFrameByName:frameNames]];
}
CCAnimation *gigAnim = [CCAnimation animationWithFrames:nuvemAnim delay:1.0f/24.0f];
CCAnimate* animate = [CCAnimate actionWithAnimation:gigAnim];
[bMoved runAction:[CCSequence actions:
[CCDelayTime actionWithDuration:1],
animate,
[CCDelayTime actionWithDuration:1],
[CCCallFunc actionWithTarget:self selector:@selector(changeCCScene)],
nil]];
}
return self;
、
レベル:
-(id) init{
if((self=[super init])) {
self.isTouchEnabled=YES;
CCSpriteFrameCache* frameCache = [CCSpriteFrameCache sharedSpriteFrameCache];
[frameCache addSpriteFramesWithFile:@"Level3.plist"];
CCSprite * backgound = [CCSprite spriteWithSpriteFrameName:@"Fundo9.png"];
backgound.anchorPoint=ccp(0,0);
[self addChild:backgound z:-1];
CCSprite man = [CCSprite spriteWithSpriteFrameName:@"Man1.png"];
[self man z:0];
eAnim = [[NSMutableArray alloc] init];
for (int i = 2; i < 178; i++) {
NSString *frameNames = [NSString stringWithFormat:@Man%i.png",i];
[eAnim addObject:[[CCSpriteFrameCache sharedSpriteFrameCache]
spriteFrameByName:frameNames]];
}
が、すべてのフレーム
2012-04-03 23:37:51.987 GigV1[1432:10a03] cocos2d: WARNING: an alias with name Man12.png already exists
2012-04-03 23:37:51.988 GigV1[1432:10a03] cocos2d: WARNING: an alias with name Man155.png already exists
のために無限コンソールで私にこれが起こる理由を任意のideaiをこのタイプのエラーを与えます?
おかげ
私の問題を解決できる...私はLevelのメソッド "OnEnter#それ自身のエラーが続きます。 ありがとう – DaSilva