CDefenceAnimation.h 903 B

12345678910111213141516171819202122232425262728293031323334
  1. #pragma once
  2. #include "CBattleStackAnimation.h"
  3. #include "SStackAttackedInfo.h"
  4. class CStack;
  5. /*
  6. * CDefenceAnimation.h, part of VCMI engine
  7. *
  8. * Authors: listed in file AUTHORS in main folder
  9. *
  10. * License: GNU General Public License v2.0 or later
  11. * Full text of license available in license.txt file, in main folder
  12. *
  13. */
  14. /// Animation of a defending unit
  15. class CDefenceAnimation : public CBattleStackAnimation
  16. {
  17. private:
  18. //std::vector<SSStackAttackedInfo> attackedInfos;
  19. int dmg; //damage dealt
  20. int amountKilled; //how many creatures in stack has been killed
  21. const CStack * attacker; //attacking stack
  22. bool byShooting; //if true, stack has been attacked by shooting
  23. bool killed; //if true, stack has been killed
  24. public:
  25. bool init();
  26. void nextFrame();
  27. void endAnim();
  28. CDefenceAnimation(SStackAttackedInfo _attackedInfo, CBattleInterface * _owner);
  29. };