- (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。任何帮助都会很棒.. !!
答案 0 :(得分:0)
实施了cctouchesBegan / move并结束并且工作正常。忽略KKInput