feat: started work on reloading

This commit is contained in:
Sara 2025-08-05 16:20:55 +02:00
parent 2d720a983a
commit 150231c67c
17 changed files with 63 additions and 33 deletions

View file

@ -26,6 +26,12 @@ public:
void set_body(PlayerBody *body);
PlayerBody *get_body() const;
void set_max_ammo(int amount);
int get_max_ammo() const;
void set_loaded_ammo(int amount);
int get_loaded_ammo() const;
bool try_use_ammo(int amount = 1);
virtual bool allows_running() const { return false; }
virtual bool allows_jumping() const { return true; }
virtual void notify_selected() {}
@ -35,6 +41,9 @@ private:
AnimationPlayer *anim{ nullptr };
PlayerCamera *camera{ nullptr };
PlayerBody *body{ nullptr };
int loaded_ammo{ 0 };
int max_ammo{ 1 };
};
#endif // !WEAPON_BASE_H