cleaned up elevator physics, added ability to hold the elevator at one location
added elevator with a on/off button to level highrise (0.6 chance to show up)
This commit is contained in:
landgreen
2021-05-27 07:11:39 -07:00
parent 39e6ee5dde
commit 8ab86fea09
7 changed files with 123 additions and 141 deletions

View File

@@ -1266,7 +1266,7 @@ const spawn = {
let targets = [] //track who is in the node boss, for shields
mobs.spawn(x, y, 6, radius, "#b386e8");
let me = mob[mob.length - 1];
Matter.Body.setDensity(me, 0.0015); //extra dense //normal is 0.001 //makes effective life much larger
Matter.Body.setDensity(me, 0.004); //extra dense //normal is 0.001 //makes effective life much larger
me.isBoss = true;
targets.push(me.id) //add to shield protection
me.friction = 0;
@@ -1328,7 +1328,7 @@ const spawn = {
for (let i = 0; i < nodes; ++i) {
spawn.stabber(x + sideLength * Math.sin(i * angle), y + sideLength * Math.cos(i * angle), radius, 12);
Matter.Body.setDensity(mob[mob.length - 1], 0.002); //extra dense //normal is 0.001 //makes effective life much larger
Matter.Body.setDensity(mob[mob.length - 1], 0.004); //extra dense //normal is 0.001 //makes effective life much larger
targets.push(mob[mob.length - 1].id) //track who is in the node boss, for shields
}
@@ -3347,7 +3347,7 @@ const spawn = {
me.seeAtDistance2 = 2000000;
me.memory = Infinity;
me.frictionAir = 0.01;
me.accelMag = 0.00004 * simulation.accelScale;
me.accelMag = 0.00003 * simulation.accelScale;
me.collisionFilter.mask = cat.player | cat.bullet //| cat.body
spawn.shield(me, x, y, 1);