dimanche 1 juin 2014

Scene Change Crash in cocos2d


Vote count:

0




i am having a problem when trying to push a button and going to the next scene. I get the SIGABRT error.... i don't know what the problem is, maybe you can figure it out... here is my code



//Play Button
CCMenuItem *playbutton;
playbutton = [CCMenuItemFont itemWithString:@"Play" target:self selector:@selector(playButtonMeathod:)];


CMenu *menu = [CCMenu menuWithItems:itemAchievement,playbutton,itemLeaderboard, nil];



[menu alignItemsHorizontallyWithPadding:20];
[menu setPosition:ccp( size.width/2, size.height/2 - 50)];

// Add the menu to the layer
[self addChild:menu];


-(void)playButtonMeathod{ // Create a scene transition that uses the "RotoZoom" effect



CCTransitionRotoZoom *transition = [CCTransitionRotoZoom transitionWithDuration:1.0 scene:[Level_1 scene]];



// Tell the director to run the transition

[[CCDirector sharedDirector] replaceScene:transition];


} Thanks for any help



asked 33 secs ago






Aucun commentaire:

Enregistrer un commentaire