mirror of
https://github.com/Sheldan/canvas.git
synced 2026-04-19 13:10:19 +00:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user