0
- (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。任何帮助都会很棒..!!

4

1 回答 1

0

实施 cctouchesBegan/moved 并结束,它工作。忽略 KKInput

于 2013-04-08T11:05:34.223 回答