-(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 変数の両方で同じ出力が得られますか?