cloacking field graphics
This commit is contained in:
@@ -644,7 +644,6 @@ const game = {
|
||||
game.fpsInterval = 1000 / game.fpsCap;
|
||||
game.then = Date.now();
|
||||
requestAnimationFrame(cycle); //starts game loop
|
||||
game.lastLogTime = game.cycle + 360;
|
||||
},
|
||||
clearNow: false,
|
||||
clearMap() {
|
||||
|
||||
@@ -24,7 +24,7 @@ const level = {
|
||||
|
||||
// game.levelsCleared = 3; //for testing to simulate possible mobs spawns
|
||||
// b.giveGuns(0) // set a starting gun for testing
|
||||
// mech.fieldUpgrades[1]() //give a field power up for testing
|
||||
mech.fieldUpgrades[7]() //give a field power up for testing
|
||||
} else {
|
||||
spawn.setSpawnList(); //picks a couple mobs types for a themed random mob spawns
|
||||
this[this.levels[this.onLevel]](); //picks the current map from the the levels array
|
||||
|
||||
11
js/player.js
11
js/player.js
@@ -796,7 +796,7 @@ const mech = {
|
||||
fieldUpgrades: [
|
||||
() => {
|
||||
mech.fieldMode = 0;
|
||||
game.makeTextLog("<strong style='font-size:30px;'>Field Emitter</strong><br> (right click or spacebar)<p>lets you pick up and throw objects<br>shields you from damage</p>", 1200);
|
||||
game.makeTextLog("<strong style='font-size:30px;'>Field Emitter</strong><br> (right click or space bar)<p>lets you pick up and throw objects<br>shields you from damage</p>", Infinity);
|
||||
mech.setHoldDefaults();
|
||||
mech.hold = function () {
|
||||
if (mech.isHolding) {
|
||||
@@ -1062,7 +1062,7 @@ const mech = {
|
||||
mech.fieldMode = 6;
|
||||
game.makeTextLog("<strong style='font-size:30px;'>Metamaterial Refractive Optics</strong><br> (right mouse or space bar) <p>localized invisibility field</p>", 1200);
|
||||
mech.setHoldDefaults();
|
||||
mech.grabRange = 200;
|
||||
mech.grabRange = 150;
|
||||
mech.fieldArc = 0.1; //0.2 is normal
|
||||
// mech.fieldArc = 1; //field covers full 360 degrees
|
||||
mech.calculateFieldThreshold();
|
||||
@@ -1081,7 +1081,7 @@ const mech = {
|
||||
mech.isStealth = true //isStealth is checked in mob foundPlayer()
|
||||
|
||||
//draw stealth field
|
||||
ctx.fillStyle = "rgba(255,255,255,0.4)";
|
||||
ctx.fillStyle = "rgba(255,255,255,0.6)";
|
||||
ctx.fill();
|
||||
ctx.beginPath();
|
||||
ctx.arc(mech.pos.x, mech.pos.y, mech.grabRange - 20, 0, 2 * Math.PI);
|
||||
@@ -1089,6 +1089,11 @@ const mech = {
|
||||
ctx.fill();
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
|
||||
ctx.beginPath();
|
||||
ctx.arc(mech.pos.x, mech.pos.y, mech.grabRange - 20, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = "rgba(210,230,255,0.5)";
|
||||
ctx.fill();
|
||||
|
||||
mech.drawField();
|
||||
mech.grabPowerUp();
|
||||
mech.pushMobs();
|
||||
|
||||
@@ -117,13 +117,13 @@ const powerUps = {
|
||||
if (b.inventory.length === 1) {
|
||||
game.makeTextLog(
|
||||
// "<div style='font-size:120%;' >new gun: " + b.guns[newGun].name + "</div><span class = 'box'>E</span> / <span class = 'box'>Q</span>",
|
||||
"<div style='font-size:150%;'><strong>" + b.guns[newGun].name + "</strong></div> (left click) <br> <p style='font-size:90%;'><strong>Q</strong>, <strong>E</strong>, and <strong>mouse wheel</strong> change weapons</p>",
|
||||
"<div style='font-size:170%;'>" + b.guns[newGun].name + "</div> (left click) <br> <p style='font-size:90%;'><strong>Q</strong>, <strong>E</strong>, and <strong>mouse wheel</strong> change weapons</p>",
|
||||
500
|
||||
);
|
||||
} else {
|
||||
game.makeTextLog(
|
||||
// "<div style='font-size:120%;' >new gun: " + b.guns[newGun].name + "</div><span class = 'box'>E</span> / <span class = 'box'>Q</span>",
|
||||
"<div style='font-size:150%;'><strong>" + b.guns[newGun].name + "</strong></div> (left click)",
|
||||
"<div style='font-size:170%;'>" + b.guns[newGun].name + "</div> (left click)",
|
||||
400
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user