1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- //
- // Created by IgorBat on 17.03.2018.
- //
- #ifndef THE_GAME_EFFECT_H
- #define THE_GAME_EFFECT_H
- #pragma once
- #include <iostream>
- #include <vector>
- //#include "AbstractFactory.h"
- class Unit;
- class Cell;
- class Effect : public QObject {
- Q_OBJECT
- public:
- explicit Effect(QString parameters);
- virtual ~Effect() {}
- int getCount();
- void setCount(int value);
- int getDurability;
- void setDurability(int value);
- //---------------------------------------------//
- //----------------GUI section------------------//
- //---------------------------------------------//
- QString getEffectName() const;
- QString getEffectDescr() const;
- QImage getEffectIcon() const;
- //---------------------------------------------//
- //-----------Parameters load section-----------//
- //---------------------------------------------//
- private:
- void loadEffectDescr(QString effect_folder);
- void loadEffectIcon(QString effect_folder);
- public:
- virtual void OperateOnCell(Cell* cell) = 0;
- virtual void OperateOnUnit(Unit* unit) = 0;
- protected:
- int count_;
- int durability_;
- // GUI values
- QString effect_name_;
- QString effect_descr_;
- QImage effect_icon_;
- };
- #endif //THE_GAME_EFFECT_H
|