CAttackAnimation.h 1003 B

1234567891011121314151617181920212223242526272829303132333435
  1. #pragma once
  2. #include "CBattleStackAnimation.h"
  3. #include "../CAnimation.h"
  4. #include "../../lib/SBattleHex.h"
  5. class CBattleInterface;
  6. class CStack;
  7. /*
  8. * CAttackAnimation.h, part of VCMI engine
  9. *
  10. * Authors: listed in file AUTHORS in main folder
  11. *
  12. * License: GNU General Public License v2.0 or later
  13. * Full text of license available in license.txt file, in main folder
  14. *
  15. */
  16. /// This class is responsible for managing the battle attack animation
  17. class CAttackAnimation : public CBattleStackAnimation
  18. {
  19. protected:
  20. SBattleHex dest; //attacked hex
  21. bool shooting;
  22. CCreatureAnim::EAnimType group; //if shooting is true, print this animation group
  23. const CStack *attackedStack;
  24. const CStack *attackingStack;
  25. int attackingStackPosBeforeReturn; //for stacks with return_after_strike feature
  26. public:
  27. void nextFrame();
  28. bool checkInitialConditions();
  29. CAttackAnimation(CBattleInterface *_owner, const CStack *attacker, SBattleHex _dest, const CStack *defender);
  30. };