feat: implementations of initial weapon inventory interface
This commit is contained in:
parent
6cdb2cbd4f
commit
6fa9d11af5
12 changed files with 126 additions and 11 deletions
|
|
@ -10,8 +10,9 @@ class WeaponInventory : public Node {
|
|||
GDCLASS(WeaponInventory, Node);
|
||||
static void _bind_methods();
|
||||
void on_switch_input();
|
||||
void stow_current_weapon();
|
||||
void ready();
|
||||
void select_weapon(WeaponBase *next);
|
||||
|
||||
protected:
|
||||
void _notification(int what);
|
||||
|
||||
|
|
@ -19,15 +20,19 @@ public:
|
|||
void set_fallback_weapon(Ref<PackedScene> scene);
|
||||
Ref<PackedScene> get_fallback_weapon() const;
|
||||
|
||||
void select_weapon(WeaponBase *next);
|
||||
WeaponBase *get_current_weapon() const;
|
||||
|
||||
void pickup_weapon(Ref<PackedScene> weapon_scene);
|
||||
|
||||
private:
|
||||
Node3D *weapon_parent{ nullptr };
|
||||
unsigned current{ 0 };
|
||||
LocalVector<WeaponBase *> weapons{ nullptr, nullptr };
|
||||
WeaponBase *current_weapon{ nullptr };
|
||||
WeaponBase *fallback_weapon{ nullptr };
|
||||
|
||||
Ref<PackedScene> default_weapon_scene{};
|
||||
Ref<PackedScene> fallback_weapon_scene{};
|
||||
};
|
||||
|
||||
#endif // !WEAPON_INVENTORY_H
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue