我想在我制作的 Actionscript 3 游戏中限制子弹的射速。任何帮助将非常感激。下面是我的代码。
//shooting bullet
function shoot(Evt:MouseEvent)
{
var sound2 = new bullet_shoot();
sound2.play();
if (bulletCounter < 5)
{
bulletCounter++;
}
else
{
bulletCounter = 0;
}
shootmc(bulletArray[bulletCounter]);
}
function shootmc(mc:MovieClip)
{
mc.visible = true;
mc.x = spaceman_mc.x;
mc.y = spaceman_mc.y;
mc.gotoAndPlay(2);
}