- (void)update:(ccTime)delta
{
CCDirector* director = [CCDirector sharedDirector];
if (director.currentPlatformIsIOS)
{
KKInput* input = [KKInput sharedInput];
if ([KKInput sharedInput].anyTouchBeganThisFrame) {NSLog(@"anyTouchBeganThisFrame");}
if ([KKInput sharedInput].anyTouchEndedThisFrame) {NSLog(@"anyTouchEndedThisFrame");}
if ([input isAnyTouchOnNode:self.ballRed touchPhase:KKTouchPhaseBegan]){NSLog(@"isAnyTouchOnNode");}
}
}即使对于isAnyTouchOnNode,也不会因为TouchBegan事件未触发而调用anyTouchEndedThisFrame。如果我将其更改为KKTouchPhaseStationary/KKTouchPhaseAny,则事件会完美地发生。
我最近从COCOS2d 2.0转到了Kobold2d。任何帮助都是很棒的..!!
发布于 2013-04-08 19:05:34
实现了cctouchesBegan/moved和and,它起作用了。忽略的KKInput
https://stackoverflow.com/questions/15843290
复制相似问题