I want to make an action in my sprites when they get touched, this is the action method:
-(void) spriteEffect
{
CCSprite *actionEffect = avatar;
id jump = [CCJumpBy actionWithDuration:1 position: ccp(0, 0) height:50 jumps:1];
id sequence = [CCSequence actions: jump, nil];
[actionEffect runAction:sequence];
}
now, my problem is, that I don't know how to make the touch action connect with the sprite; should I use this?
- (void)ccTouchesBegan:(NSSet*)touches withEvent:(UIEvent*)event
Msp are in a .png image with a .plist assigned.