0
我有2層和ccTouchMoves事件我必須摧毀和重建精靈從第一層移動到第二後如何重建同精靈,繼續觸摸事件
我這樣做類似的東西
-(void)ccTouchMoved:(UITouch *)touch withEvent:(UIEvent *)event
sprite = [CCSprite spriteWithFile:@"file.png"];
[[self parent] addChild: sprite]
if (sprite)
{
[sprite ccTouchBegan:touch withEvent:event];
// [character ccTouchMoved:touch withEvent:event];
}
[self removeFromParentAndCleanup:true];
}
精靈創建和調用的方法ccTouchBegan但在那之後一切方法是終止 如何調用ccTouchMoved和ccTouchEnd就像簡單的觸摸事件
好主意..謝謝,但現在他抱怨'@「代表已經添加到觸發調度器。」'即時添加onEnter和onExit touchDelegates如何檢查是委託添加? – user1644430
對不起....錯誤修復http://code.google.com/p/cocos2d-iphone/issues/detail?id=1267和謝謝 – user1644430