Skip to content

Commit

Permalink
Fix a variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
dorianbayart committed Nov 19, 2023
1 parent 8550cc3 commit 60a5802
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions energy/missilesmanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ export class MissilesManager {
g.scene.add(missile.mesh);
}

deleteMissiles(mobstodelete_array) {
for (var i = 0; i < mobstodelete_array.length; i++) {
const index = this.missileArray.indexOf(mobstodelete_array[i]);
deleteMissiles(missilestodelete_array) {
for (var i = 0; i < missilestodelete_array.length; i++) {
const index = this.missileArray.indexOf(missilestodelete_array[i]);
if (index > -1) {
this.missileArray.splice(index, 1);
}
g.scene.remove(mobstodelete_array[i].mesh);
g.scene.remove(missilestodelete_array[i].mesh);
}
}

Expand Down

0 comments on commit 60a5802

Please sign in to comment.