sábado, 24 de marzo de 2012

Cocos2d iOS 5.1 - Drag and drop a sprite

- (void)ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
    UITouch *touch = [touches anyObject];
    CGPoint location = [touch locationInView: [touch view]];
 
    [mySprite setPosition:ccp(location.x , location.y )];
}

No hay comentarios: