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,8 +60,9 @@ class Hero extends GameObject {
let id = setInterval(() => {
if (this.cooldown > 0) {
this.cooldown -= 100;
} else {
clearInterval(id);
if(this.cooldown === 0) {
clearInterval(id);
}
}
}, 200);
}

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

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

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

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

Loading…
Cancel
Save