How to reset buttons when using touchesBegan
- by FireStorm
When I use touchesBegan on my sprite kit game the buttons press down fine the first time but are unresponsive the second time, how do I "reset" these buttons if you will. Buttons are as follows:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint location = [touch locationInNode:self];
SKNode *node = [self nodeAtPoint:location];
if ([node.name isEqualToString:@"Button"]) {
[self runAction:[SKAction playSoundFileNamed:@"sound" waitForCompletion: NO]];
....
Thanks for your help!