I am using the following method that invoked by pressing a button thru sprite builder.
- (void)method {
//static dispatch_once_t pred; //
//dispatch_once(&pred, ^{ // run only once code below
[self performSelector:@selector(aaa) withObject:nil afterDelay:0.f];
[self performSelector:@selector(bbb) withObject:nil afterDelay:1.f];
[self performSelector:@selector(ccc) withObject:nil afterDelay:1.5f];
[self performSelector:@selector(ddd) withObject:nil afterDelay:4.f];
[self performSelector:@selector(eee) withObject:nil afterDelay:4.5f];
CCLOG(@"Received a touch");
//}); //run only once code above
}
as you can see from the comments i tried running it once. that works good, but if a user comes back to this scene, it's disabled until you restart the app. how can i block this method from being executed a second time until the first time is done. i know the code is rough, i'm just learning here....
thanks in advance.