survivors: reducing jumpiness of homing projectiles re-directing by limiting it to a certain angle

adding rad degree conversion utils checking world border for projectiles
This commit is contained in:
Sheldan
2025-08-21 17:48:16 +02:00
parent c8767f1119
commit 71f48404c9
4 changed files with 61 additions and 4 deletions

View File

@@ -62,6 +62,10 @@ export class World {
return this._size;
}
outside(position: Vector): boolean {
return position.x > this.size.x || position.y > this.size.y || position.x < 0 || position.y < 0
}
addEnemy(enemy: Enemy) {
this._enemies.push(enemy)
}