survivors: homing projectiles now continuously try to find a new target after their initial has died

This commit is contained in:
Sheldan
2025-08-30 20:31:22 +02:00
parent b591fc2dee
commit 1124e62bb7
3 changed files with 35 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import type {Placeable} from "./interfaces.ts";
import type {Healthy, Placeable} from "./interfaces.ts";
export class Vector {
@@ -125,4 +125,35 @@ export class Point implements Placeable {
move(any?: any) {
}
}
export class DeadPoint implements Placeable, Healthy {
private position: Vector;
constructor(position: Vector) {
this.position = position;
}
getPosition(): Vector {
return this.position;
}
getSize() {
}
move(any?: any) {
}
dead() {
return true;
}
die() {
}
takeDamage(damage: number) {
}
}