TurnStarted.cpp 760 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * TurnStarted.cpp, 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. #include "StdInc.h"
  11. #include "TurnStarted.h"
  12. #include <vcmi/events/EventBus.h>
  13. VCMI_LIB_NAMESPACE_BEGIN
  14. namespace events
  15. {
  16. SubscriptionRegistry<TurnStarted> * TurnStarted::getRegistry()
  17. {
  18. static auto Instance = std::make_unique<SubscriptionRegistry<TurnStarted>>();
  19. return Instance.get();
  20. }
  21. void TurnStarted::defaultExecute(const EventBus * bus)
  22. {
  23. CTurnStarted event;
  24. bus->executeEvent(event);
  25. }
  26. CTurnStarted::CTurnStarted() = default;
  27. bool CTurnStarted::isEnabled() const
  28. {
  29. return true;
  30. }
  31. }
  32. VCMI_LIB_NAMESPACE_END