diff --git a/src/jugando.ts b/src/jugando.ts index bdbc4f8..95d55d9 100644 --- a/src/jugando.ts +++ b/src/jugando.ts @@ -221,7 +221,7 @@ export function update(juego: Juego, dt: number) { } while (juego.state.enemies.length < ENEMIES_NUM) { - const x = Math.random() * MAP_SIZE + MAP_MIN; + const x = Math.random() * 6000 + juego.state.pos.x; // Don't spawn enemies too close if (Math.abs(juego.state.pos.x - x) < 300) continue; juego.state.enemies.push({