relay switch

bug fix - grower mob becoming immune to damage when shielded and growing bigger than shield

relay switch - toggles ON/OFF when you pick up a power up
tech: ice IX condenser - if ON make a couple Ice IX crystals every second
This commit is contained in:
landgreen
2021-03-26 05:54:28 -07:00
parent 84e4079181
commit 3ab42884ca
9 changed files with 206 additions and 118 deletions

View File

@@ -767,9 +767,6 @@ const mobs = {
this.force.x += this.accelMag * this.mass;
}
}
// else {
// this.gravity();
// }
},
grow() {
if (!m.isBodiesAsleep) {
@@ -780,6 +777,10 @@ const mobs = {
this.radius *= scale;
// this.torque = -0.00002 * this.inertia;
this.fill = `hsl(144, ${this.radius}%, 50%)`;
if (this.isShielded) { //remove shield if shielded when growing
this.isShielded = false;
this.removeConsBB();
}
}
} else {
if (this.radius > 15) {