diff --git a/js/config.js b/js/config.js index ae0bdb0..9ed782f 100644 --- a/js/config.js +++ b/js/config.js @@ -86,8 +86,8 @@ const CONFIG = { projectileTrailAlpha: 0.6, projectileCircleAlpha: 0.5, enemyPulseRate: 0.05, - enemyAlphaBase: 0.7, - enemyAlphaRange: 0.3, + enemyAlphaBase: 1.0, + enemyAlphaRange: 0.0, enemyGlowPulse: 5, particleDecayBase: 0.02, particleDecayRange: 0.03, diff --git a/js/enemy.js b/js/enemy.js index 46b0bc4..3b65f85 100644 --- a/js/enemy.js +++ b/js/enemy.js @@ -151,6 +151,8 @@ class Enemy { ctx.lineTo(this.x - boxW / 2, this.y + boxH / 2 - off); ctx.lineTo(this.x - boxW / 2, this.y - boxH / 2 + off); ctx.closePath(); + ctx.fillStyle = flash ? "#ffffff" : "#0a0a0a"; + ctx.fill(); ctx.stroke(); const barW = boxW - S.armorBarPad; @@ -228,6 +230,8 @@ class Enemy { ctx.lineTo(this.x - boxW / 2 + off, this.y + boxH / 2); ctx.lineTo(this.x - boxW / 2, this.y); ctx.closePath(); + ctx.fillStyle = flash ? "#ffffff" : "#0a0a0a"; + ctx.fill(); ctx.stroke(); const barW = boxW - S.armorBarPad; @@ -262,6 +266,8 @@ class Enemy { ctx.fillStyle = flash ? CONFIG.colors.white : CONFIG.colors.heavy; ctx.fillText(this.text, this.x, this.y); } else { + ctx.fillStyle = flash ? "#ffffff" : "#0a0a0a"; + ctx.fillRect(this.x - boxW / 2, this.y - boxH / 2, boxW, boxH); ctx.strokeRect(this.x - boxW / 2, this.y - boxH / 2, boxW, boxH); ctx.shadowBlur = 0; diff --git a/js/game.js b/js/game.js index 2960d5f..51fae2d 100644 --- a/js/game.js +++ b/js/game.js @@ -298,7 +298,8 @@ function draw() { for (let p of projectiles) p.draw(); for (let p of particles) p.draw(); - for (let e of enemies) e.draw(); + const sortedEnemies = enemies.slice().sort((a, b) => a.speed - b.speed); + for (let e of sortedEnemies) e.draw(); if (wavePauseActive) { const alpha = wavePauseTimer > 30 ? 1 : wavePauseTimer / 30;