Fix laser cooldown bug

pull/174/head
Raymond Xu 4 years ago
parent ac605c9982
commit 75f0073b47

@ -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() {

@ -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 {
let id = setInterval(() => {
if (this.cooldown > 0) {
this.cooldown -= 100;
} else {
if(this.cooldown === 0) {
clearInterval(id);
}
}
}, 200);
}
canFire() {

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

@ -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() {

Loading…
Cancel
Save