ioscocos2d-iphonekobold2d

Kobold2D anyTouchEndedThisFrame does not get called - I could not figure out the reasons?


- (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 is not getting called with that TouchBegan event is not triggering even for isAnyTouchOnNode. If I change it to KKTouchPhaseStationary/KKTouchPhaseAny the event is occurring flawlessly.

I recently shifted from COCOS2d 2.0 to Kobold2d. Any help would be great..!!


Solution

  • implemented cctouchesBegan/moved and ended and it worked. Ignored KKInput