-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
UITouch *touch = [touches anyObject];
CGPoint point1 = [touch previousLocationInView:[touch view]];
CGPoint point2 = [touch locationInView:[touch view]];
point1 = [[CCDirector sharedDirector]convertToGL:point1];
point2 = [[CCDirector sharedDirector]convertToGL:point2];
pre = point1;
curr = point2;
CCLOG(@"the pre location is %@",NSStringFromCGPoint(pre));
CCLOG(@"the curr location is %@",NSStringFromCGPoint(curr));
}
上面的代码有什么问题?pre 和 curr 变量都给出相同的输出?