BlastModule.cpp 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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 <AzCore/Memory/SystemAllocator.h>
  9. #include <AzCore/Module/Module.h>
  10. #include <Components/BlastFamilyComponent.h>
  11. #include <Components/BlastMeshDataComponent.h>
  12. #include <Components/BlastSystemComponent.h>
  13. #include <IGem.h>
  14. #ifdef BLAST_EDITOR
  15. #include <Editor/EditorBlastFamilyComponent.h>
  16. #include <Editor/EditorBlastMeshDataComponent.h>
  17. #include <Editor/EditorSystemComponent.h>
  18. #endif
  19. namespace Blast
  20. {
  21. class BlastModule : public CryHooksModule
  22. {
  23. public:
  24. AZ_RTTI(BlastModule, "{897CCA50-FBAF-4F5A-A859-1951091E0555}", CryHooksModule);
  25. BlastModule()
  26. : CryHooksModule()
  27. {
  28. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  29. m_descriptors.insert(
  30. m_descriptors.end(),
  31. {
  32. BlastSystemComponent::CreateDescriptor(),
  33. BlastFamilyComponent::CreateDescriptor(),
  34. BlastMeshDataComponent::CreateDescriptor(),
  35. #ifdef BLAST_EDITOR
  36. EditorSystemComponent::CreateDescriptor(),
  37. EditorBlastFamilyComponent::CreateDescriptor(),
  38. EditorBlastMeshDataComponent::CreateDescriptor()
  39. #endif
  40. });
  41. }
  42. /**
  43. * Add required SystemComponents to the SystemEntity.
  44. */
  45. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  46. {
  47. return AZ::ComponentTypeList{
  48. azrtti_typeid<BlastSystemComponent>(),
  49. #ifdef BLAST_EDITOR
  50. azrtti_typeid<EditorSystemComponent>(),
  51. #endif
  52. };
  53. }
  54. };
  55. } // namespace Blast
  56. // DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
  57. // The first parameter should be GemName_GemIdLower
  58. // The second should be the fully qualified name of the class above
  59. AZ_DECLARE_MODULE_CLASS(Gem_Blast, Blast::BlastModule)