Reputation: 43
I am experimenting with SpriteKite and it is handling touch events perfectly. How can I implement a shake event? I assume I am failing the set the first responder correctly within the scene/when the scene is presented.
code within SKScene that is never called.
-(void)motionEnded:(UIEventSubtype)motion withEvent:(UIEvent *)event {
if (event.subtype == UIEventSubtypeMotionShake ) {
[self shakeEvent];
}
}
Thank you in advance
Upvotes: 4
Views: 366
Reputation: 86
You may post a notification from the ViewController and add an observer to the SKScene.
Upvotes: 1