1

In a game I am working on I wish to implement a counter at the start of a game and I want to pause, stop or delay all actions( animations, timers etc) in the game until the counter finishes counting and displays a label and the game actions resumes.

please how do I get around this?

Devin Burke
  • 13,642
  • 12
  • 55
  • 82
Zaki
  • 129
  • 2
  • 12

1 Answers1

0

you can implement something like that

-(void) pauseGame  {
    [sprite1 pauseSchedulerAndActions];
    [sprite2 pauseSchedulerAndActions];
    [self pauseSchedulerAndActions];
}

-(void) resumeGame  {
    [sprite1 resumeSchedulerAndActions];
    [sprite2 resumeSchedulerAndActions];
    [self resumeSchedulerAndActions];
}

simply dont pause the label/sprite that is performing the counter. Keep in mind that pauseSchedulerAndAction will pause a Node, but not its childs, so you can easly pause a layer without pausing a counter inside it.

Ultrakorne
  • 1,303
  • 11
  • 18