I n my code the main menu starts the game by:
[(CCLayerMultiplex*)parent_ switchTo:1];
and the game over screen:
[(CCLayerMultiplex*)parent_ switchTo:2];
and then it switches back to the main menu.
However when i then jump back to layer 1 (the game) a second time, (it should be restarted by calling the init function again) all the sprite movements are just stopped and the score is not reseted.
is there any similar to viewDidAppear or something like that i need to use?
-(id) init{
if( ! [super init] )
return nil;
self.isTouchEnabled = YES;
self.isAccelerometerEnabled = YES;
self.score=0;
self.life=100;
self.fuel=1000;
....