D'accord, voici la solution pour OSX.
Vous devez d'abord initialiser la scène (l'objet autonome) afin qu'elle surveille les clics.
self.userInteractionEnabled = YES; //do this somewhere in initialization
Dans le gestionnaire d'événement mouseDown, vérifier pour voir si un noeud (spécifiquement un SKSpriteNode dans ce cas) a été touché.
-(void)mouseDown:(NSEvent *)theEvent {
CGPoint location = [theEvent locationInNode:self]; //get location of touch
SKSpriteNode *spriteTouched = (SKSpriteNode*)[self nodeAtPoint:location]; //get a node if touched at that location
//DO SOMETHING WITH THE NODE
...
}
Je commencerais avec la documentation Apple pour kit de sprite, il a un certain nombre d'exemples sur la façon de manipuler les touches et sprites. https://developer.apple.com/library/ios/documentation/GraphicsAnimation/Conceptual/SpriteKit_PG/Introduction/Introduction.html –