SimpleMotionComponentBus.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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 <AzCore/EBus/EBus.h>
  10. #include <AzCore/Component/ComponentBus.h>
  11. namespace EMotionFX
  12. {
  13. class MotionInstance;
  14. namespace Integration
  15. {
  16. class SimpleMotionComponentRequests
  17. : public AZ::ComponentBus
  18. {
  19. public:
  20. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  21. virtual void LoopMotion(bool enable) = 0;
  22. virtual bool GetLoopMotion() const = 0;
  23. virtual void RetargetMotion(bool enable) = 0;
  24. virtual void ReverseMotion(bool enable) = 0;
  25. virtual void MirrorMotion(bool enable) = 0;
  26. virtual void SetPlaySpeed(float speed) = 0;
  27. virtual float GetPlaySpeed() const = 0;
  28. virtual void PlayTime(float time) = 0;
  29. virtual float GetPlayTime() const = 0;
  30. virtual float GetDuration() const = 0;
  31. virtual void Motion(AZ::Data::AssetId assetId) = 0;
  32. virtual AZ::Data::AssetId GetMotion() const = 0;
  33. virtual void BlendInTime(float time) = 0;
  34. virtual float GetBlendInTime() const = 0;
  35. virtual void BlendOutTime(float time) = 0;
  36. virtual float GetBlendOutTime() const = 0;
  37. virtual void PlayMotion() = 0;
  38. };
  39. using SimpleMotionComponentRequestBus = AZ::EBus<SimpleMotionComponentRequests>;
  40. }
  41. }