したがって、Cosmo.hitTestObject の場合、Asteroid 5 を削除する必要がありますが、すぐに別の位置に追加したいので、ヒット テストが自動的にトリガーされません。どうすればこれを行うことができますか?
var nCount1:Number = 0;
timer_Text1.text = nCount1.toString();
addEventListener(Event.ENTER_FRAME,massCollect);
function massCollect(e:Event) {
if (Cosmo.hitTestObject(Asteroid5)) {
removeChild(Asteroid5);
nCount1++;
timer_Text1.text = nCount1.toString();
}
if (nCount1 == 5) {
gotoAndStop(351, "Scene 1");
removeEventListener(Event.ENTER_FRAME,massCollect);
}
}