Files
wolf_dart/lib/features/weapon/weapons/knife.dart
2026-03-14 00:05:32 +01:00

24 lines
511 B
Dart

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