inv;
std::vector::iterator iter;
public:
~Inventory();
void baseIni()
{
inv.push_back(new
Gun("M9", 2, 2, 0.7));
inv.push_back(new Gun("AR-15", 8, 12, 3.9));
inv.push_back(new Gun("RPG", 15, 1, 6.3));
inv.push_back(new Heal("HP", 20));
}
void AddItem(Item* i) { inv.push_back(i); }
void delItem(std::string Name);
void nextItem() { (Count >= inv.size() - 1) ? Count = 0 : Count++;}
template
T* getItemByName(std::string Name);
template
T* getItem(int index);
std::string getItemName(int num) const;
std::vector- getArrayItem() { return inv; }
};
class Item : public Engine::Object
{
public:
Item() = default;
Item(std::string name) : Object(name) { type = ItemType::item; weight = 0; }
virtual ~Item();
float getWeight();
ItemType getType();
protected:
ItemType type;
float weight;
};