Hey...
I've been testing my game for quite sometime and made a tweak for user input, so I won't get user input when the game is finished,
so I added this line of code to my gameLayer :
- (void)gameOver {
state = kStateOver;
isTouchEnabled = NO;
.....
}
And then after sometime I return to the main menu, and the app would crash whenever I click on a MenuItem in my menu scene... I tracked the crash through the debugger and I got to the TouchHandler... and it says (NSSet *)touches is empty, no objects inside...
After digging in code for hours, I removed the isTouchEnabled = NO line, and viola - everything is working....
So my point is, if I defined at a certain layer to not receive touches, touchHandler won't change it back whenever I replace the scene/layer....
I don't know if it's a bug or maybe it's just the wrong approach...
I could create a test application that simulates the bug if you want Riq...
~ Natan Avra.