removed level.fillBG

added new graphics to several maps

to level developers: level.fillBG and level.fill no longer work,
you should draw backgrounds directly in level.custom like this:
level.custom = () => {
    ctx.fillStyle = "rgba(0,255,255,0.1)";
    ctx.fillRect(6400, -550, 300, 350);
    level.playerExitCheck();
    level.exit.draw();
    level.enter.draw();
};
This commit is contained in:
landgreen
2021-03-31 18:03:08 -07:00
parent 4848cc4e73
commit 94314f7a59
6 changed files with 489 additions and 1138 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -19,7 +19,6 @@ const simulation = {
simulation.checks();
ctx.save();
simulation.camera();
level.drawFillBGs();
level.custom();
simulation.draw.powerUp();
mobs.draw();
@@ -30,7 +29,6 @@ const simulation = {
m.draw();
m.hold();
// v.draw(); //working on visibility work in progress
level.drawFills();
level.customTopLayer();
simulation.draw.drawMapPath();
b.fire();
@@ -54,13 +52,13 @@ const simulation = {
m.airControl()
}
// level.checkZones();
level.custom();
level.checkQuery();
m.move();
m.look();
simulation.checks();
ctx.save();
simulation.camera();
level.custom();
m.draw();
level.customTopLayer();
simulation.draw.wireFrame();
@@ -715,8 +713,6 @@ const simulation = {
m.fireCDcycle = 0
m.drop();
m.hole.isOn = false;
level.fill = [];
level.fillBG = [];
level.zones = [];
level.queryList = [];
simulation.drawList = [];

View File

@@ -3486,67 +3486,9 @@ const spawn = {
},
boost(x, y, height = 1000) {
spawn.mapVertex(x + 50, y + 35, "120 40 -120 40 -50 -40 50 -40");
// level.addZone(x, y, 100, 30, "fling", {Vx:Vx, Vy: Vy});
level.addQueryRegion(x, y - 20, 100, 20, "boost", [
[player], body, mob, powerUp, bullet
], -1.21 * Math.sqrt(Math.abs(height)));
let color = "rgba(200,0,255,";
level.fillBG.push({
x: x,
y: y - 25,
width: 100,
height: 25,
color: color + "0.2)"
});
level.fillBG.push({
x: x,
y: y - 55,
width: 100,
height: 55,
color: color + "0.1)"
});
level.fillBG.push({
x: x,
y: y - 120,
width: 100,
height: 120,
color: color + "0.05)"
});
},
laserZone(x, y, width, height, dmg) {
level.addZone(x, y, width, height, "laser", {
dmg
});
level.fill.push({
x: x,
y: y,
width: width,
height: height,
color: "#f00"
});
},
deathQuery(x, y, width, height) {
level.addQueryRegion(x, y, width, height, "death", [
[player], mob
]);
level.fill.push({
x: x,
y: y,
width: width,
height: height,
color: "#f00"
});
},
platform(x, y, width, height) {
const size = 20;
spawn.mapRect(x, y + height, width, 30);
level.fillBG.push({
x: x + width / 2 - size / 2,
y: y,
width: size,
height: height,
color: "#f0f0f3"
});
},
blockDoor(x, y, blockSize = 60) {
spawn.mapRect(x, y - 290, 40, 60); // door lip

View File

@@ -920,7 +920,7 @@
description: "<strong>20%</strong> chance to build a <strong class='color-bot'>bot</strong> after killing a mob<br>the <strong class='color-bot'>bot</strong> lasts for about <strong>20</strong> seconds",
maxCount: 3,
count: 0,
frequency: 2,
frequency: 1,
isBotTech: true,
allowed() {
return b.totalBots() > 0 && !tech.sporesOnDeath && !tech.nailsDeathMob && !tech.isExplodeMob
@@ -938,7 +938,7 @@
description: "a <strong class='color-bot'>bot</strong> fires <strong>nails</strong> at mobs in line of sight",
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
isBot: true,
isBotTech: true,
allowed() {
@@ -983,7 +983,7 @@
description: "a <strong class='color-bot'>bot</strong> fires <strong>foam</strong> at nearby mobs",
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
isBot: true,
isBotTech: true,
allowed() {
@@ -1028,7 +1028,7 @@
description: "a <strong class='color-bot'>bot</strong> <strong>defends</strong> the space around you<br>ignites an <strong class='color-e'>explosion</strong> after hitting a mob",
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
isBot: true,
isBotTech: true,
allowed() {
@@ -1073,7 +1073,7 @@
description: "a <strong class='color-bot'>bot</strong> uses <strong class='color-f'>energy</strong> to emit a <strong class='color-laser'>laser</strong> beam<br>that targets nearby mobs",
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
isBot: true,
isBotTech: true,
allowed() {
@@ -1118,7 +1118,7 @@
description: "a <strong class='color-bot'>bot</strong> is locked in <strong>orbit</strong> around you<br><strong>stuns</strong> and <strong class='color-d'>damages</strong> mobs on <strong>contact</strong>",
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
isBot: true,
isBotTech: true,
allowed() {
@@ -1172,7 +1172,7 @@
description: "a <strong class='color-bot'>bot</strong> <strong class='color-d'>damages</strong> mobs while it <strong>traces</strong> your path<br>regen <strong>6</strong> <strong class='color-f'>energy</strong> per second when it's near",
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
isBot: true,
isBotTech: true,
allowed() {
@@ -1234,7 +1234,7 @@
description: "use <strong>1</strong> <strong class='color-r'>research</strong> to spawn a random <strong>bot</strong><br><strong>quadruple</strong> the <strong class='flicker'>frequency</strong> of finding <strong>bot</strong> <strong class='color-m'>tech</strong>",
maxCount: 1,
count: 0,
frequency: 2,
frequency: 1,
isBotTech: true,
allowed() {
return (b.totalBots() > 1 && powerUps.research.count > 0) || build.isExperimentSelection
@@ -1330,7 +1330,7 @@
description: "increase <strong>block</strong> collision <strong class='color-d'>damage</strong> by <strong>100%</strong><br>charge <strong>throws</strong> more <strong>quickly</strong> for less <strong class='color-f'>energy</strong>",
maxCount: 1,
count: 0,
frequency: 2,
frequency: 1,
allowed() {
return m.fieldUpgrades[m.fieldMode].name !== "wormhole"
},
@@ -1380,7 +1380,7 @@
description: `after receiving <strong class='color-harm'>harm</strong> from a <strong>collision</strong> become<br><strong>immune</strong> to <strong class='color-harm'>harm</strong> for an extra <strong>0.75</strong> seconds`,
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
allowed() {
return true
},
@@ -1916,7 +1916,7 @@
description: "increase your <strong>maximum</strong> <strong class='color-f'>energy</strong> by <strong>50</strong>",
maxCount: 9,
count: 0,
frequency: 2,
frequency: 1,
allowed() {
return m.maxEnergy > 0.99
},