Fixed the number of elements in the smart bomb screen flash array.
JavaScript’s Math.round() was rounding my floating point figures up to an array index that didn’t exist.
This will have affected IE users. I couldn’t recreate the problem in Opera, Firefox, Safari or Chrome.
On a plus note it gave me the chance to look at presenting a dramatic screen flash to accompany the smart bomb explosion.
Comments
instead of use “gameaudio = gameaudio == true ? false : true;”
you can do: “gameaudio = !gameaudio;”
value = !true; //result in false;
good and cool job!