- reimplemented & improved player inventory - now player has "Action2" which means he can interact with the environment - added weapon energy cost - updated player action interface
37 lines
626 B
C++
37 lines
626 B
C++
/*
|
|
* InventoryItem.cpp
|
|
*
|
|
* Created on: Dec 11, 2016
|
|
* Author: tibi
|
|
*/
|
|
|
|
#include <components/basic/InventoryItem.h>
|
|
#include <iostream>
|
|
|
|
namespace farmlands {
|
|
namespace components {
|
|
namespace basic {
|
|
|
|
InventoryItem::~InventoryItem()
|
|
{
|
|
}
|
|
|
|
model::Component* InventoryItem::clone()
|
|
{
|
|
InventoryItem* item = new InventoryItem();
|
|
item->slot = slot;
|
|
return item;
|
|
}
|
|
|
|
void InventoryItem::dump(unsigned level)
|
|
{
|
|
for (unsigned i = 0; i < level; i++)
|
|
std::cout<<" ";
|
|
|
|
std::cout << " .Component: InventoryItem slot=" << slot << "\n";
|
|
}
|
|
|
|
} /* namespace basic */
|
|
} /* namespace components */
|
|
} /* namespace farmlands */
|