Kobold2D anytouchendthisframe没有被调用-我不知道原因


- (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");}
     }
}

anytouchendthisframe没有被调用,即使isAnyTouchOnNode也没有触发TouchBegan事件。如果我将其更改为KKTouchPhaseStationary/KKTouchPhaseAny,则事件将完美地发生。

我最近从COCOS2d 2.0转向了Kobold2d。任何帮助都会很棒的!!

实现了cctouchesBegan/moved and ended,它工作了。忽略KKInput

相关内容

最新更新