0
我有啓用觸摸一個CCLayer類和以下方法:快速觸摸崩潰我的遊戲
-(void)ccTouchesBegan:(NSSet *)touches withEvent:(UIEvent *)event;
-(void)ccTouchesEnded:(NSSet *)touches withEvent:(UIEvent *)event;
如果我在iPad屏幕上快速敲擊多次,它將crash--而不是點得到一個堆棧跟蹤。它只會凍結......控制檯將閱讀:
2012-10-17 08:43:06.445 game[5432:607] cocos2d: animation stopped
2012-10-17 08:43:06.448 game[5432:607] cocos2d: animation started with frame interval: 4.00
2012-10-17 08:43:07.075 game[5432:607] cocos2d: animation stopped
2012-10-17 08:43:07.081 game[5432:607] cocos2d: animation started with frame interval: 60.00
2012-10-17 08:43:12.557 game[5432:607] cocos2d: animation stopped
2012-10-17 08:43:12.561 game[5432:607] cocos2d: animation started with frame interval: 4.00
是否有進行速率限制ccTouchesBegan/ccTouchesEnded方法的方法嗎?如果我刪除這些事件處理程序中的所有代碼,甚至會發生這種情況 - 這只是觸發該方法的行爲,而且這種方法似乎會讓所有事情都陷入困境。