Improved weapon switching

Signed-off-by: Hans Kokx <hans.d.kokx@gmail.com>
This commit is contained in:
2026-03-14 00:05:32 +01:00
parent 895a997604
commit cdd676233f
8 changed files with 61 additions and 54 deletions

View File

@@ -1,7 +1,9 @@
enum WeaponState { idle, firing }
enum WeaponType { knife, pistol, machineGun, chainGun }
abstract class Weapon {
final String name;
final WeaponType type;
final int idleSprite;
final List<int> fireFrames;
final int damage;
@@ -12,7 +14,7 @@ abstract class Weapon {
int lastFrameTime = 0;
Weapon({
required this.name,
required this.type,
required this.idleSprite,
required this.fireFrames,
required this.damage,