Implemented some tools. Also, implemented inventory.

This commit is contained in:
2016-12-03 19:43:28 +02:00
parent 91c0da855b
commit 0dc77aacb4
38 changed files with 1713 additions and 654 deletions

View File

@@ -0,0 +1,45 @@
/*
* WateringCan.h
*
* Created on: Dec 3, 2016
* Author: tibi
*/
#ifndef COMPONENTS_ITEMS_WATERINGCAN_H_
#define COMPONENTS_ITEMS_WATERINGCAN_H_
#include <components/Background.h>
#include <components/items/ITool.h>
#include <model/Component.h>
#include <model/Direction.h>
namespace farmlands {
namespace components {
namespace items {
class WateringCan: public model::Component, public ITool
{
public:
WateringCan();
virtual ~WateringCan();
virtual model::Component* clone() override;
virtual void dump(unsigned level) override;
virtual void onInitialize() override;
virtual void performAction(float x, float y, model::Direction d) override;
public:
uint32_t capacity;
uint32_t amountLeft;
private:
Background* m_back;
};
} /* namespace items */
} /* namespace components */
} /* namespace farmlands */
#endif /* COMPONENTS_ITEMS_WATERINGCAN_H_ */