Cocos2d に重大な問題があります。
1) ボタンが少ないシーンが 1 つあります。
2) 使用する別のシーンがあります。
-(void) onEnter {
[[[CCDirector sharedDirector] touchDispatcher] addTargetedDelegate:self priority:0 swallowTouches:YES];
[super onEnter];
}
そしてまた
-(void) onExit {
[[[CCDirector sharedDirector] touchDispatcher] removeDelegate:self];
[super onExit];
}
3) 最初のシーンを 2 番目のシーンに置き換えた後、すべて問題あり
ません。何も機能しません
5) 1 番目のシーンの「onExit()」ボタンで「removeDelegate」を使用していない場合でも、2 番目のシーンからのタッチは引き続きアクティブです。