我用真迹iphone5 xcode5.0.2
什么代码都没加 就开始add 了一个精灵
然后ccTouchesMoved 只上下移动 偶尔就会出现卡顿
代码
-
(void) ccTouchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{UITouch *touch = ;
CGPoint touchLocation = ];
CGPoint currentTouchLocation;
currentTouchLocation = convertToGL:touchLocation];CGPoint lastTouchLocation = ;
lastTouchLocation = convertToGL:lastTouchLocation];// Take the difference of the current to the last touch location.
CGPoint moveTo = ccpSub(lastTouchLocation, currentTouchLocation);CGPoint tempTo = ccp(0, -moveTo.y);
CCSprite *a = (CCSprite *);
a.position = ccpAdd(a.position, tempTo);
}
请问什么原因, 如果这都能卡 那还做个P游戏啊