entity_spell_system/inventory/bag.h
Relintai 9aaa5d1d5a -Renamed CharacterSkeletonBoneId to CharacterSkeletonPoints.
-Added rank to spells.
-Removed The Icon class, and the SpellManager.
-More cleanup.
-Removed more collection dynamic allocations.
2019-05-30 00:26:02 +02:00

33 lines
617 B
C++

#ifndef BAG_H
#define BAG_H
#include "core/reference.h"
#include "core/vector.h"
#include "../data/item_instance.h"
#include "bag_slot.h"
class Bag : public Reference {
GDCLASS(Bag, Reference);
public:
Ref<BagSlot> get_slot(int index);
Ref<BagSlot> get_and_remove_slot(int index);
int get_slot_count();
void set_slot_count(int count);
bool try_to_add_item(Ref<ItemInstance> item, int count = 1);
bool add_item_to_slot(Ref<ItemInstance> item, int slot_index, int count = 1);
Bag();
~Bag();
protected:
static void _bind_methods();
private:
Vector<Ref<BagSlot> > _slots;
};
#endif