12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- //
- // Created by IgorBat on 17.03.2018.
- //
- #ifndef THE_GAME_EFFECT_H
- #define THE_GAME_EFFECT_H
- #pragma once
- #include <iostream>
- #include <vector>
- #include <QFile>
- #include <QString>
- #include <QTextStream>
- #include <QImage>
- 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;
- virtual void OperateOnUnitToCell(Unit* who, Cell* where) = 0;
- protected:
- int count_;
- int durability_;
- // GUI values
- QString effect_name_;
- QString effect_descr_;
- QImage effect_icon_;
- };
- #endif //THE_GAME_EFFECT_H
|