MaestroModule.cpp 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. #include "Components/SequenceComponent.h"
  9. #include "Components/SequenceAgentComponent.h"
  10. #if defined(MAESTRO_EDITOR)
  11. #include "Components/EditorSequenceComponent.h"
  12. #include "Components/EditorSequenceAgentComponent.h"
  13. #endif
  14. #include "MaestroSystemComponent.h"
  15. #include <IGem.h>
  16. namespace Maestro
  17. {
  18. class MaestroModule
  19. : public CryHooksModule
  20. {
  21. public:
  22. AZ_RTTI(MaestroModule, "{ED1C74E6-BB73-4AC5-BD4B-91EFB400BAF4}", CryHooksModule);
  23. MaestroModule()
  24. : CryHooksModule()
  25. {
  26. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  27. m_descriptors.insert(m_descriptors.end(), {
  28. MaestroAllocatorComponent::CreateDescriptor(),
  29. MaestroSystemComponent::CreateDescriptor(),
  30. SequenceComponent::CreateDescriptor(),
  31. SequenceAgentComponent::CreateDescriptor(),
  32. #if defined(MAESTRO_EDITOR)
  33. EditorSequenceComponent::CreateDescriptor(),
  34. EditorSequenceAgentComponent::CreateDescriptor(),
  35. #endif
  36. });
  37. }
  38. /**
  39. * Add required SystemComponents to the SystemEntity.
  40. */
  41. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  42. {
  43. return AZ::ComponentTypeList{
  44. azrtti_typeid<MaestroAllocatorComponent>(),
  45. azrtti_typeid<MaestroSystemComponent>()
  46. };
  47. }
  48. };
  49. }
  50. #if defined(O3DE_GEM_NAME)
  51. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), Maestro::MaestroModule)
  52. #else
  53. AZ_DECLARE_MODULE_CLASS(Gem_Maestro, Maestro::MaestroModule)
  54. #endif