survivors: adding simple drops

moving size to world object
adding dying for enemies and projectiles and theoretically for players
adding pull range for player
adding money stat display
made pistol homing
This commit is contained in:
Sheldan
2025-08-21 16:44:20 +02:00
parent 18c323430c
commit c8767f1119
11 changed files with 388 additions and 81 deletions

View File

@@ -7,7 +7,7 @@ export function drawDot(position: Vector, size: number, color: string, ctx: Canv
ctx.fill();
}
export function moveInDirectionOf(position: Vector, target: Vector, speedFactor): Vector {
export function moveInDirectionOf(position: Vector, target: Vector, speedFactor: number): Vector {
let playerVector = Vector.createVector(target, position);
let direction = playerVector.normalize()
return position.add(direction.multiply(speedFactor))