mirror of
https://github.com/MartinKral/Slash-The-Hordes
synced 2024-12-25 11:18:54 +00:00
Circular spawner distance
This commit is contained in:
parent
bee157e93b
commit
01e33c003b
@ -25,8 +25,8 @@ export class CircularEnemySpawner extends DelayedEnemySpawner {
|
||||
const angle: number = (2 * Math.PI) / this.enemiesToSpawn;
|
||||
|
||||
for (let i = 0; i < this.enemiesToSpawn; i++) {
|
||||
const posX: number = roundToOneDecimal(Math.sin(angle * i)) * 500;
|
||||
const posY: number = roundToOneDecimal(Math.cos(angle * i)) * 500;
|
||||
const posX: number = roundToOneDecimal(Math.sin(angle * i)) * 700;
|
||||
const posY: number = roundToOneDecimal(Math.cos(angle * i)) * 700;
|
||||
this.enemySpawner.spawnNewEnemy(posX, posY, this.enemyId);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user