survivors: adding collision for faster projectiles to also consider collisions between ticks

differentiating between pistol and homing pistol
using projectile speed for straight projectile
This commit is contained in:
Sheldan
2025-08-22 00:23:22 +02:00
parent 07b64154e1
commit 66ef2eaa31
7 changed files with 114 additions and 26 deletions

View File

@@ -6,7 +6,7 @@ import {Player} from "./Player.ts";
import {Vector} from "./base.ts";
import {BasicEnemy, Enemy, HealthEnemy, ShootingEnemy} from "./Enemies.ts";
import {HUD} from "./ui.ts";
import {Pistol} from "./weapons.ts";
import {HomingPistol, Pistol} from "./weapons.ts";
let hud: HUD;
@@ -118,7 +118,7 @@ docReady(function () {
}, 15_000)
player.addWeapon(Pistol.spawnPistol(world))
player.addWeapon(Pistol.spawnPistol(world))
player.addWeapon(HomingPistol.spawnPistol(world))
hud = new HUD(world);