TurnStarted.cpp 751 B

123456789101112131415161718192021222324252627282930313233343536373839
  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. namespace events
  14. {
  15. SubscriptionRegistry<TurnStarted> * TurnStarted::getRegistry()
  16. {
  17. static std::unique_ptr<SubscriptionRegistry<TurnStarted>> Instance = make_unique<SubscriptionRegistry<TurnStarted>>();
  18. return Instance.get();
  19. }
  20. void TurnStarted::defaultExecute(const EventBus * bus)
  21. {
  22. CTurnStarted event;
  23. bus->executeEvent(event);
  24. }
  25. CTurnStarted::CTurnStarted() = default;
  26. bool CTurnStarted::isEnabled() const
  27. {
  28. return true;
  29. }
  30. }