0
votes
1answer
80 views

How to use UILongPressGestureRecognizer with sprite drag & wait?

May be it's asked before also but I couldn't find any good answer. Please tell me how this can be implemented with UILongPressGestureRecognizer? A user drags a sprite from X location to Y location. ...
1
vote
0answers
70 views

UITapGestureRecognizer fast tapping not working [closed]

I have initialized UITapGesture as follows: tapGestureRecognizer = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleSingleTap:)]; tapGestureRecognizer.numberOfTapsRequired = ...
0
votes
0answers
104 views

How to get sprites react to touches in cocos2d-android

i have 1 gun when tap on any area on the screen bullets fires out, but according to my requirement there are 3 guns(sprites) when touched on any of the sprites bullets must fire up, when googled i ...
0
votes
1answer
286 views

Touching a CGRect

In my cocos2d app I am trying to determine when a CCSprite is touched Here is what I have: -(BOOL)ccTouchBegan:(UITouch *)touch withEvent:(UIEvent *)event{ NSMutableArray *targetsToDelete = ...
1
vote
1answer
561 views

How can I scroll sprites when swiping using Cocos2D?

I'm adding 3 sprites (layers) to CCParallaxNode: BGLayer = [CCSprite spriteWithFile:@"Layer.png"]; [_backgroundNode addChild:BGLayer z:2 parallaxRatio:layer1Speed ...