Kobold2D anyTouchEndedThisFrame没有被调用 - 我无法弄清楚原因?

时间:2013-04-05 20:48:41

标签: ios cocos2d-iphone kobold2d

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

1 个答案:

答案 0 :(得分:0)

实施了cctouchesBegan / move并结束并且工作正常。忽略KKInput