My problem is: When I creat a sprite at a specific position and with CCActionMoveTo, I made it to move another position. During its movement the sprite detect touch events . But when I touch my sprite during the movement it doesn’t work:
-(void)caca
{
target = [CCSprite spriteWithFile:@"boulerouge_06.png"];
target.position=(300,10);
[self addChild:target];
id actionMove = [CCMoveTo actionWithDuration:3
position:ccp(240, 160)];
[target runAction:actionMove];
}
Sprites don’t detect touch events. You need to create a control layer and they can then tell your sprites to do something else via your game layer.