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.cpp
2013-07-10 23:41:24 +02:00

27 lines
387 B
C++

/*
* Gadget.cpp
*
* Created on: 06.07.2013
* Author: Felix
*/
#include "Gadget.h"
#include "../abstract/Character.h"
Gadget::Gadget(std::string name) :
mName(name) {
}
void
Gadget::use(Character& character) {
if (mCooldownTimer.isExpired()) {
onUse(character);
mCooldownTimer.restart(getCooldownTime());
}
}
std::string
Gadget::getName() const {
return mName;
}