foam bug fixes

This commit is contained in:
landgreen
2019-12-15 17:55:49 -08:00
committed by GitHub
parent 66479c9b82
commit 03b16e223d
5 changed files with 28 additions and 28 deletions

View File

@@ -587,7 +587,7 @@ const spawn = {
};
// if (Math.random() < Math.min(0.2 + game.difficulty * 0.1, 0.7)) spawn.shield(me, x, y);
me.do = function () {
if (!this.isSleeping) {
if (!mech.isBodiesAsleep) {
this.seePlayerByLookingAt();
const dist2 = this.distanceToPlayer2();
//laser Tracking
@@ -689,7 +689,7 @@ const spawn = {
this.attraction();
this.gravity();
//draw
if (!this.isSleeping) {
if (!mech.isBodiesAsleep) {
if (this.seePlayer.yes) {
if (this.alpha < 1) this.alpha += 0.01;
} else {