ApplePickingNotifications.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 "PickingStructs.h"
  10. #include <AzCore/EBus/EBus.h>
  11. namespace AppleKraken
  12. {
  13. //! Notifications related to apple picking.
  14. class ApplePickingNotifications : public AZ::EBusTraits
  15. {
  16. public:
  17. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  18. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::ById;
  19. // Messages are addressed by EntityId.
  20. using BusIdType = AZ::EntityId;
  21. //! The effector is ready for picking
  22. virtual void EffectorReadyForPicking() = 0;
  23. //! An apple was successfully picked.
  24. virtual void ApplePicked() = 0;
  25. //! An apple was successfully retrieved to storage and can count as harvested.
  26. virtual void AppleRetrieved() = 0;
  27. //! Apple picking failed
  28. //! @param reason reason for failure, e.g. "out of reach", "apple not found", "approach obstructed", etc.
  29. virtual void PickingFailed(const AZStd::string& reason) = 0;
  30. };
  31. using ApplePickingNotificationBus = AZ::EBus<ApplePickingNotifications>;
  32. } // namespace AppleKraken