mirror of
https://github.com/Sheldan/canvas.git
synced 2026-04-20 05:24:06 +00:00
survivors: homing projectiles now continuously try to find a new target after their initial has died
This commit is contained in:
@@ -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) {
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user