Files
wolf_dart/lib/features/player/weapons/knife.dart
2026-03-13 20:36:40 +01:00

25 lines
529 B
Dart

import 'package:wolf_dart/features/player/weapon.dart';
class Knife extends Weapon {
Knife()
: super(
name: "Knife",
idleSprite: 416,
fireFrames: [417, 418, 419],
damage: 15,
msPerFrame: 120,
);
@override
bool fire(int currentTime, {required int currentAmmo}) {
// Knife doesn't need ammo!
if (state == WeaponState.idle) {
state = WeaponState.firing;
frameIndex = 0;
lastFrameTime = currentTime;
return true;
}
return false;
}
}