feat: update waves, enemies

This commit is contained in:
2026-06-25 09:05:44 +05:00
parent 89d39452ed
commit 5489c0f8d5
6 changed files with 518 additions and 124 deletions
+5
View File
@@ -48,6 +48,11 @@ class Projectile {
const dy = this.target.y - this.y;
const dist = Math.sqrt(dx * dx + dy * dy);
if (dist > 0) {
this.vx = (dx / dist) * this.speed;
this.vy = (dy / dist) * this.speed;
}
if (dist < S.projectileHitRadius) {
this.hit = true;
game.onProjectileHit(this, this.target);