Add wave configuration for new wave 5 with updated path threshold logic

This commit introduces a new wave configuration (wave 5) with its schedule segments and enemy properties. It also adjusts the path threshold calculation in WaveManager to improve enemy movement accuracy when reaching waypoints.
This commit is contained in:
Brian Fertig 2025-09-04 21:05:16 -06:00
parent 91a5919fe4
commit 603cf47348
2 changed files with 24 additions and 2 deletions

View File

@ -64,7 +64,7 @@ export const WAVE_CONFIG = {
1: {
begin: 0,
basic1: 10,
basic3: 2
basic3: 2,
},
2: {
begin: 15,
@ -76,6 +76,28 @@ export const WAVE_CONFIG = {
begin: 30,
basic3: 4
}
},
//Wave
5: {
//Schedule
1: {
begin: 0,
advanced1: 1,
},
2: {
begin: 20,
basic1: 8,
basic2: 3,
basic3: 2
},
3: {
begin: 35,
basic1: 15
},
4: {
begin: 40,
advanced2: 1
}
}
}
}

View File

@ -125,7 +125,7 @@ export class WaveManager {
Math.pow(enemy.y - this.scene.gridToLocation(nextPoint.y, offsetY), 2)
);
if (distToNextPoint < segmentSpeed * 0.5) { // Threshold for reaching point
if (distToNextPoint < segmentSpeed * 0.2) { // Threshold for reaching point
enemy.props.pathPhase++; // Move to next path segment
// If we've reached the end of the path, remove the enemy or handle accordingly