field graphics changes
This commit is contained in:
@@ -24,7 +24,7 @@ const level = {
|
|||||||
|
|
||||||
// game.levelsCleared = 3; //for testing to simulate possible mobs spawns
|
// game.levelsCleared = 3; //for testing to simulate possible mobs spawns
|
||||||
// b.giveGuns(0) // set a starting gun for testing
|
// b.giveGuns(0) // set a starting gun for testing
|
||||||
mech.fieldUpgrades[7]() //give a field power up for testing
|
// mech.fieldUpgrades[4]() //give a field power up for testing
|
||||||
} else {
|
} else {
|
||||||
spawn.setSpawnList(); //picks a couple mobs types for a themed random mob spawns
|
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
|
this[this.levels[this.onLevel]](); //picks the current map from the the levels array
|
||||||
@@ -115,12 +115,12 @@ const level = {
|
|||||||
// powerUps.spawn(400, -400, "field", false, '4');
|
// powerUps.spawn(400, -400, "field", false, '4');
|
||||||
// powerUps.spawn(400, -400, "gun", false);
|
// powerUps.spawn(400, -400, "gun", false);
|
||||||
// spawn.bodyRect(-45, -100, 40, 50);
|
// spawn.bodyRect(-45, -100, 40, 50);
|
||||||
// spawn.starter(800, -1150);
|
spawn.focuser(800, -1150);
|
||||||
// spawn.groupBoss(-600, -550);
|
// spawn.groupBoss(-600, -550);
|
||||||
// for (let i = 0; i < 1; ++i) {
|
// for (let i = 0; i < 1; ++i) {
|
||||||
// spawn.shooter(800, -1150);
|
// spawn.shooter(800, -1150);
|
||||||
// }
|
// }
|
||||||
spawn.groupBoss(900, -1070);
|
// spawn.groupBoss(900, -1070);
|
||||||
// for (let i = 0; i < 20; i++) {
|
// for (let i = 0; i < 20; i++) {
|
||||||
// spawn.randomBoss(-100, -1470);
|
// spawn.randomBoss(-100, -1470);
|
||||||
// }
|
// }
|
||||||
|
|||||||
@@ -521,7 +521,7 @@ const spawn = {
|
|||||||
this.seePlayerByLookingAt();
|
this.seePlayerByLookingAt();
|
||||||
const dist2 = this.distanceToPlayer2();
|
const dist2 = this.distanceToPlayer2();
|
||||||
//laser Tracking
|
//laser Tracking
|
||||||
if (this.seePlayer.yes && dist2 < 4000000) {
|
if (this.seePlayer.yes && dist2 < 4000000 && !mech.isStealth) {
|
||||||
this.attraction();
|
this.attraction();
|
||||||
const rangeWidth = 2000; //this is sqrt of 4000000 from above if()
|
const rangeWidth = 2000; //this is sqrt of 4000000 from above if()
|
||||||
//targeting laser will slowly move from the mob to the player's position
|
//targeting laser will slowly move from the mob to the player's position
|
||||||
|
|||||||
Reference in New Issue
Block a user