cocos2D ccTouchEnded崩溃

时间:2012-02-12 22:04:36

标签: iphone objective-c cocoa-touch cocos2d-iphone

我无法找到与我的问题相关的话题。我需要image1移动到我触摸的点。执行此代码块时程序崩溃:

-(void)ccTouchEnded:(UITouch *)touch withEvent:(UIEvent *)event {

    CGPoint touchedLocation = [touch locationInView: [touch view]];
    CGPoint convertedLocation = [[CCDirector sharedDirector]convertToGL:touchedLocation];

    [imageOne stopAllActions];
    [imageOne runAction:[CCMoveTo actionWithDuration:4 position:convertedLocation]];
}

0 个答案:

没有答案