EditorAudioSwitchComponent.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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/std/string/string.h>
  10. #include <AzToolsFramework/ToolsComponents/EditorComponentBase.h>
  11. #include <IAudioInterfacesCommonData.h>
  12. #include <AzToolsFramework/UI/PropertyEditor/PropertyAudioCtrlTypes.h>
  13. #include "AudioSwitchComponent.h"
  14. namespace LmbrCentral
  15. {
  16. /*!
  17. * EditorAudioSwitchComponent
  18. */
  19. class EditorAudioSwitchComponent
  20. : public AzToolsFramework::Components::EditorComponentBase
  21. {
  22. public:
  23. AZ_EDITOR_COMPONENT(EditorAudioSwitchComponent, "{804E49F9-BD9A-402A-96D1-C666E81984E6}",
  24. AzToolsFramework::Components::EditorComponentBase);
  25. EditorAudioSwitchComponent();
  26. void BuildGameEntity(AZ::Entity* gameEntity) override;
  27. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  28. {
  29. LmbrCentral::AudioSwitchComponent::GetProvidedServices(provided);
  30. }
  31. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  32. {
  33. LmbrCentral::AudioSwitchComponent::GetRequiredServices(required);
  34. }
  35. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  36. {
  37. LmbrCentral::AudioSwitchComponent::GetIncompatibleServices(incompatible);
  38. }
  39. static void Reflect(AZ::ReflectContext* context);
  40. private:
  41. //! Serialized data
  42. AzToolsFramework::CReflectedVarAudioControl m_defaultSwitch;
  43. AzToolsFramework::CReflectedVarAudioControl m_defaultState;
  44. };
  45. } // namespace LmbrCentral