Files
wolf_dart/lib/features/weapon/weapons/knife.dart
2026-03-13 23:10:39 +01:00

24 lines
510 B
Dart

import 'package:wolf_dart/features/weapon/weapons/weapon.dart';
class Knife extends Weapon {
Knife()
: super(
name: "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;
}
}