123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #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);
-
-
-
- QString getEffectName() const;
- QString getEffectDescr() const;
- QImage getEffectIcon() const;
-
-
-
- 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_;
-
- QString effect_name_;
- QString effect_descr_;
- QImage effect_icon_;
- };
- #endif
|