Player changes:
- reimplemented & improved player inventory - now player has "Action2" which means he can interact with the environment - added weapon energy cost - updated player action interface
This commit is contained in:
36
src/components/basic/InventoryItem.cpp
Normal file
36
src/components/basic/InventoryItem.cpp
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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 */
|
Reference in New Issue
Block a user