- (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");}
}
}
anyTouchEndedThisFrame 没有被调用,即使是 isAnyTouchOnNode 也没有触发 TouchBegan 事件。如果我将其更改为 KKTouchPhaseStationary/KKTouchPhaseAny,则事件将完美地发生。
我最近从 COCOS2d 2.0 转移到了 Kobold2d。任何帮助都会很棒..!!