Fix laser cooldown bug
@ -60,9 +60,10 @@ class Hero extends GameObject {
let id = setInterval(() => {
if (this.cooldown > 0) {
this.cooldown -= 100;
} else {
if(this.cooldown === 0) {
clearInterval(id);
}
}, 200);
canFire() {
@ -58,9 +58,10 @@ class Hero extends GameObject {
@ -65,9 +65,10 @@ class Hero extends GameObject {