This repository has been archived on 2019-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
dungeon-gunner/source/items/Gadget.h

36 lines
546 B
C
Raw Normal View History

2013-07-06 19:21:25 +00:00
/*
* Gadget.h
*
* Created on: 06.07.2013
* Author: Felix
*/
#ifndef DG_GADGET_H_
#define DG_GADGET_H_
#include <Thor/Time.hpp>
2013-07-14 19:56:44 +00:00
#include "Item.h"
2013-07-06 19:21:25 +00:00
class Character;
2013-07-14 19:56:44 +00:00
class Gadget : public Item {
2013-07-06 19:21:25 +00:00
public:
2013-07-10 21:41:24 +00:00
Gadget(std::string name);
void use(Character& character);
2013-07-06 19:21:25 +00:00
virtual void onThink(int elapsed) = 0;
2013-07-10 21:41:24 +00:00
std::string getName() const;
2013-07-06 19:21:25 +00:00
protected:
virtual void onUse(Character& character) = 0;
virtual sf::Time getCooldownTime() = 0;
protected:
thor::Timer mCooldownTimer;
2013-07-10 21:41:24 +00:00
private:
std::string mName;
2013-07-06 19:21:25 +00:00
};
#endif /* DG_GADGET_H_ */