DemoStatisticsNotifications.h 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include "AppleEvent.h"
  10. #include <AzCore/EBus/EBus.h>
  11. #include <AzCore/Component/EntityId.h>
  12. namespace AppleKraken
  13. {
  14. using Tags = AZStd::vector<AZStd::string>;
  15. using ApplesGatheredByTag = AZStd::unordered_map<AZStd::string, uint32_t>;
  16. //! Interface to notify about statistical events
  17. class DemoStatisticsNotifications : public AZ::EBusTraits
  18. {
  19. public:
  20. static constexpr AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  21. virtual ~DemoStatisticsNotifications() = default;
  22. virtual void AddApple(const AppleEvent& appleEvent) = 0;
  23. virtual void OnApplePickerSpawned(const AZ::EntityId& entityId) = 0;
  24. virtual void SetApplePickerStatus(const AZ::EntityId& entityId, const AZStd::string& status) = 0;
  25. };
  26. using DemoStatisticsNotificationBus = AZ::EBus<DemoStatisticsNotifications>;
  27. } // namespace AppleKraken