Merge pull request #174 from TwentyPorts/main

Fix laser cooldown bug
pull/178/head
chris 4 years ago committed by GitHub
commit 896d138a72
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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