EditorAudioAreaEnvironmentComponent.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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 <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
  10. #include <IAudioSystem.h>
  11. #include <AzToolsFramework/UI/PropertyEditor/PropertyAudioCtrlTypes.h>
  12. #include "AudioAreaEnvironmentComponent.h"
  13. namespace LmbrCentral
  14. {
  15. /*!
  16. * EditorAudioAreaEnvironmentComponent
  17. */
  18. class EditorAudioAreaEnvironmentComponent
  19. : public AzToolsFramework::Components::EditorComponentBase
  20. {
  21. public:
  22. AZ_EDITOR_COMPONENT(EditorAudioAreaEnvironmentComponent, "{6CCCEAA1-02B2-4DE8-B93D-26F1509346A8}",
  23. AzToolsFramework::Components::EditorComponentBase);
  24. EditorAudioAreaEnvironmentComponent();
  25. void BuildGameEntity(AZ::Entity* gameEntity) override;
  26. protected:
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  28. {
  29. LmbrCentral::AudioAreaEnvironmentComponent::GetProvidedServices(provided);
  30. }
  31. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  32. {
  33. LmbrCentral::AudioAreaEnvironmentComponent::GetRequiredServices(required);
  34. }
  35. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  36. {
  37. LmbrCentral::AudioAreaEnvironmentComponent::GetIncompatibleServices(incompatible);
  38. }
  39. static void Reflect(AZ::ReflectContext* context);
  40. private:
  41. //! Serialized data
  42. AZ::EntityId m_broadPhaseTriggerArea;
  43. AzToolsFramework::CReflectedVarAudioControl m_environmentName;
  44. float m_environmentFadeDistance = 1.f;
  45. };
  46. } // namespace LmbrCentral