adit2789
02-24-2008, 06:41 PM
Is there a way to make it so that if the player reaches a certain score by the end of the game, a "You Win" screen comes up, but if they fall under it is "game over". Right now the way i keep score is simply:
private function checkForHit( )
{
for (var j:Number=0; j< shootArray.length; j++)
{
for (var i:Number=0; i < bombArray.length; i++)
{
if (bombArray[i].hitTestPoint( shootArray[j].x, shootArray[j].y, true))
{
//get bomb off stage
removeChild(bombArray[i]);
//get bomb out of array
bombArray.splice(i, 1);
score ++
scoreKeep.text = String(score);
break;
}
private function checkForHit( )
{
for (var j:Number=0; j< shootArray.length; j++)
{
for (var i:Number=0; i < bombArray.length; i++)
{
if (bombArray[i].hitTestPoint( shootArray[j].x, shootArray[j].y, true))
{
//get bomb off stage
removeChild(bombArray[i]);
//get bomb out of array
bombArray.splice(i, 1);
score ++
scoreKeep.text = String(score);
break;
}