|
@@ -13,24 +13,57 @@
|
|
|
class Unit;
|
|
|
class Cell;
|
|
|
|
|
|
+class Effect : public QObject {
|
|
|
+ Q_OBJECT
|
|
|
|
|
|
-class Effect {
|
|
|
-
|
|
|
-private:
|
|
|
- int count_;
|
|
|
- int durability_;
|
|
|
public:
|
|
|
- Effect() = delete;
|
|
|
- Effect(std::string path) {
|
|
|
+ explicit Effect(QString parameters);
|
|
|
|
|
|
- }
|
|
|
- virtual ~Effect() = delete;
|
|
|
+ virtual ~Effect() {}
|
|
|
|
|
|
int getCount();
|
|
|
void setCount(int value);
|
|
|
|
|
|
+ int getDurability;
|
|
|
+ void setDurability(int value);
|
|
|
+
|
|
|
+ //---------------------------------------------//
|
|
|
+ //----------------GUI section------------------//
|
|
|
+ //---------------------------------------------//
|
|
|
+
|
|
|
+ QString getUnitId() const;
|
|
|
+ QString getUnitName() const;
|
|
|
+ QString getUnitDescr() const;
|
|
|
+ QString getUnitBaseClassId() const;
|
|
|
+ std::vector<QString> getUnitTraits() const;
|
|
|
+ QImage getUnitIcon() const;
|
|
|
+
|
|
|
+ //---------------------------------------------//
|
|
|
+ //-----------Parameters load section-----------//
|
|
|
+ //---------------------------------------------//
|
|
|
+
|
|
|
+private:
|
|
|
+ void loadUnitName(QString unit_folder);
|
|
|
+ void loadUnitDescr(QString unit_folder);
|
|
|
+ void loadUnitBaseClass(QString unit_folder);
|
|
|
+ void loadUnitTraits(QString unit_folder);
|
|
|
+ void loadUnitIcon(QString unit_folder);
|
|
|
+ void loadUnitPrevSpecs(QString unit_folder);
|
|
|
+ void loadUnitUpgradeSpecs(QString unit_folder);
|
|
|
+public:
|
|
|
virtual void OperateOnCell(Cell*) = 0;
|
|
|
virtual void OperateOnUnit(Unit*) = 0;
|
|
|
- //logic here.
|
|
|
+protected:
|
|
|
+ int count_;
|
|
|
+ int durability_;
|
|
|
+
|
|
|
+ // GUI values
|
|
|
+ QString race_id_;
|
|
|
+ QString unit_id_;
|
|
|
+
|
|
|
+ QString unit_name_;
|
|
|
+ QString unit_descr_;
|
|
|
+ QString base_class_id_;
|
|
|
+ QImage unit_icon_;
|
|
|
};
|
|
|
#endif //THE_GAME_EFFECT_H
|