Implemented some tools. Also, implemented inventory.
This commit is contained in:
45
src/components/items/WateringCan.h
Normal file
45
src/components/items/WateringCan.h
Normal 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_ */
|
Reference in New Issue
Block a user