WWPOL / Earth-Invader

WWPOL entry for JS13K. Play it here >>>
http://wwpol.github.io/Earth-Invader
1 stars 1 forks source link

Removed enemies are colliding with player #16

Closed ROODAY closed 10 years ago

ROODAY commented 10 years ago

After hitting replay, there will be undefined enemies hitting the player, causing a crash. Someone try editing the for x in array loops in the replay hook at the bottom of initgame with array.indexof(object), array.splice(index,1)

e-lain commented 10 years ago

Why not just clear all arrays and such upon hitting replay? I think that would be the most simple solution.

ROODAY commented 10 years ago

The arrays are all cleared. This issue wasn't there before, I think it cropped up when we made enemies a global. I'll revert that in the next commit