2013-04-05 15 views
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事件。如果我將其更改爲KKTouchPhaseStation/KKTouchPhaseAny事件發生完美無缺。Kobold2D anyTouchEndedThisFrame不會被調用 - 我找不出原因?

我最近從COCOS2d 2.0轉移到Kobold2d。任何幫助將是偉大的..!

回答

0

實施cctouches開始/移動並結束,它的工作。忽略KKInput

相關問題