123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- //
- // 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 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;
- 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
|