Effect.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //
  2. // Created by IgorBat on 17.03.2018.
  3. //
  4. #ifndef THE_GAME_EFFECT_H
  5. #define THE_GAME_EFFECT_H
  6. #pragma once
  7. #include <iostream>
  8. #include <vector>
  9. //#include "AbstractFactory.h"
  10. class Unit;
  11. class Cell;
  12. class Effect : public QObject {
  13. Q_OBJECT
  14. public:
  15. explicit Effect(QString parameters);
  16. virtual ~Effect() {}
  17. int getCount();
  18. void setCount(int value);
  19. int getDurability;
  20. void setDurability(int value);
  21. //---------------------------------------------//
  22. //----------------GUI section------------------//
  23. //---------------------------------------------//
  24. QString getEffectName() const;
  25. QString getEffectDescr() const;
  26. QImage getEffectIcon() const;
  27. //---------------------------------------------//
  28. //-----------Parameters load section-----------//
  29. //---------------------------------------------//
  30. private:
  31. void loadEffectDescr(QString effect_folder);
  32. void loadEffectIcon(QString effect_folder);
  33. public:
  34. virtual void OperateOnCell(Cell* cell) = 0;
  35. virtual void OperateOnUnit(Unit* unit) = 0;
  36. protected:
  37. int count_;
  38. int durability_;
  39. // GUI values
  40. QString effect_name_;
  41. QString effect_descr_;
  42. QImage effect_icon_;
  43. };
  44. #endif //THE_GAME_EFFECT_H