Hey, im making a SpaceShooter game and I am using 2 arrays to hold enemys and lasers so that I can use for…in loops to detect collision and such. I have a function that spawns the enemy or laser and puts them into the array[aray.length], but when i have them destroyed I realized I can’t delete its spot in the array, which ends up slowing down my game after a while. Does anyone know how I can keep this array clean?
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Array Question
|
0 | 60 | February 21, 2005 | |
A couple of problems
|
0 | 74 | December 13, 2007 | |
[AS3] array and splice | 0 | 114 | November 19, 2011 | |
[AS3] enemy array | 0 | 106 | November 14, 2011 | |
Deleting Array (messes things up) | 0 | 69 | August 31, 2005 |