-(void) ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event
{
_nextProjectile = [[CCSprite spriteWithFile:@"arrow.png"]retain];
_nextProjectile.position = imgArrow.position;
[imgArrow runAction:[CCSequence actions:
[CCRotateTo actionWithDuration:rotateDuration angle:cocosAngle],
[CCCallFunc actionWithTarget:self selector:@selector(finishShoot)],
nil]];
//Some code
}
- (void)finishShoot {
// Ok to add now - we've finished rotation!
[self addChild:_nextProjectile];
[_projectiles addObject:_nextProjectile];
// Release
[_nextProjectile release];
_nextProjectile = nil;
}
弓を 2 回クリックすると、矢印が重なります。
何か助けて?!