IMapRendererObserver.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * IMapRendererObserver.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. VCMI_LIB_NAMESPACE_BEGIN
  12. class int3;
  13. class CGObjectInstance;
  14. class CGHeroInstance;
  15. class PlayerColor;
  16. VCMI_LIB_NAMESPACE_END
  17. class IMapObjectObserver
  18. {
  19. public:
  20. IMapObjectObserver();
  21. virtual ~IMapObjectObserver();
  22. virtual bool hasOngoingAnimations() = 0;
  23. /// Plays fade-in animation and adds object to map
  24. virtual void onObjectFadeIn(const CGObjectInstance * obj, const PlayerColor & initiator) = 0;
  25. /// Plays fade-out animation and removed object from map
  26. virtual void onObjectFadeOut(const CGObjectInstance * obj, const PlayerColor & initiator) = 0;
  27. /// Adds object to map instantly, with no animation
  28. virtual void onObjectInstantAdd(const CGObjectInstance * obj, const PlayerColor & initiator) = 0;
  29. /// Removes object from map instantly, with no animation
  30. virtual void onObjectInstantRemove(const CGObjectInstance * obj, const PlayerColor & initiator) = 0;
  31. /// Perform hero movement animation, moving hero across terrain
  32. virtual void onHeroMoved(const CGHeroInstance * obj, const int3 & from, const int3 & dest) = 0;
  33. /// Perform initialization of hero teleportation animation with terrain fade animation
  34. virtual void onBeforeHeroTeleported(const CGHeroInstance * obj, const int3 & from, const int3 & dest) = 0;
  35. virtual void onAfterHeroTeleported(const CGHeroInstance * obj, const int3 & from, const int3 & dest) = 0;
  36. virtual void onBeforeHeroEmbark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) = 0;
  37. virtual void onAfterHeroEmbark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) = 0;
  38. virtual void onBeforeHeroDisembark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) = 0;
  39. virtual void onAfterHeroDisembark(const CGHeroInstance * obj, const int3 & from, const int3 & dest) = 0;
  40. };