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:
@@ -5,14 +5,13 @@ class Knife extends Weapon {
|
||||
: super(
|
||||
name: "Knife",
|
||||
idleSprite: 416,
|
||||
fireFrames: [417, 418, 419],
|
||||
fireFrames: [417, 418, 419, 420],
|
||||
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;
|
||||
|
||||
@@ -4,8 +4,8 @@ class Pistol extends Weapon {
|
||||
Pistol()
|
||||
: super(
|
||||
name: "Pistol",
|
||||
idleSprite: 408,
|
||||
fireFrames: [409, 410, 411, 412],
|
||||
idleSprite: 421,
|
||||
fireFrames: [422, 423, 424, 425],
|
||||
damage: 20,
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user