Hey guys
I'm making a Space Shooter Game for school and I just can't find how to put my enemies in an array.
I found this code in an other thread
So what I need to make is 2 arrays, one arrEnemies where I put my emenies in and the other one arrBullets where the bullets go.Code:public function checkVirusCollisions() { // viruses var i:int = ("virus"+1); for(var j:int = 0; j < arrEnemies.length; j++){ if (arrEnemies[j].hitTestObject(arrBullets[i])) { enemieDie(i); bulletDie(j); }
Then these 2 arrays do a collision check
can someone help me? :s thanks allot in advance




Reply With Quote