portal level work in progress

This commit is contained in:
landgreen
2020-07-18 11:37:37 -07:00
parent c63d0ac5f0
commit 08e09b59c4
8 changed files with 552 additions and 217 deletions

View File

@@ -39,6 +39,7 @@ const game = {
b.bulletDraw();
b.bulletDo();
game.drawCircle();
level.customTopLayer();
// game.clip();
ctx.restore();
game.drawCursor();
@@ -67,6 +68,7 @@ const game = {
game.draw.testing();
game.drawCircle();
game.constructCycle()
level.customTopLayer();
ctx.restore();
game.testingOutput();
game.drawCursor();
@@ -691,6 +693,9 @@ const game = {
mech.holdingTarget.collisionFilter.category = 0;
mech.holdingTarget.collisionFilter.mask = 0;
}
//set fps back to default
game.fpsCap = game.fpsCapDefault
game.fpsInterval = 1000 / game.fpsCap;
},
getCoords: {
//used when building maps, outputs a draw rect command to console, only works in testing mode
@@ -735,12 +740,16 @@ const game = {
x: level.enter.x + 50,
y: level.enter.y - 20
});
// Matter.Body.setPosition(player, {
// x: player.position.x,
// y: -7000
// });
// game.noCameraScroll()
// move bots
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].isBot) {
Matter.Body.setPosition(bullet[i], player.position);
Matter.Body.setVelocity(bullet[i], {
x: 0,
y: 0
});
}
}
if (game.difficultyMode === 2) mech.damage(0.3);
if (game.difficultyMode === 1) mech.damage(0.1);
mech.energy = 0;