import 'package:wolf_3d_dart/src/entities/entities/weapon/weapon.dart';

class Knife extends Weapon {
  Knife()
    : super(
        type: WeaponType.knife,
        idleSprite: 416,
        fireFrames: [417, 418, 419, 420],
        damage: 15,
        msPerFrame: 120,
        isAutomatic: false,
      );

  @override
  bool fire(int currentTime, {required int currentAmmo}) {
    if (state == WeaponState.idle) {
      state = WeaponState.firing;
      frameIndex = 0;
      lastFrameTime = currentTime;
      return true;
    }
    return false;
  }
}
