0

我一直在处理的程序有问题

function checkForHit(baddie:Baddie):void
{
for (var i:int = 0; i < bullets.length; i++)
{
    if (baddie.hitTestPoint(bullets[i].x,bullets[i].y,true))
    {
        removeChild(baddie);
        removeChild(bullets[i]);
        baddies.splice(baddies.indexOf(baddie), 1);
        bullets.splice(bullets[i]);
        updateScore(100);
        killCounter +=  1;
        checkKillCounter();
    }
}
}

我得到 Level 1, Layer 'Actions', Frame 1, Line 165 1046: Type was not found or is not a compile-time constant: Baddie。

我可以弄清楚为什么。我尝试声明它,但这似乎不起作用

此外,它似乎在朋友做的另一个程序中工作,他的似乎工作正常

4

0 回答 0