Fixed pistol and knife sprites for retail. Added firing mechanism.

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-13 20:53:00 +01:00
parent 029e90ea9d
commit d4d5a84bc4
7 changed files with 83 additions and 20 deletions

View File

@@ -120,14 +120,11 @@ class Player {
}
void fire(int currentTime) {
// Only spend ammo if the weapon isn't a knife
bool shotFired = currentWeapon.fire(currentTime, currentAmmo: ammo);
// If it was a gun (not a knife) and it fired, consume ammo
if (shotFired && currentWeapon is! Knife) {
ammo--;
}
// TODO: We'll add Raycast hit detection here next!
}
void updateWeapon(int currentTime) {