WhiteBoxModule.cpp 1.4 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. #include "Components/WhiteBoxColliderComponent.h"
  9. #include "WhiteBoxComponent.h"
  10. #include "WhiteBoxModule.h"
  11. #include "WhiteBoxSystemComponent.h"
  12. namespace WhiteBox
  13. {
  14. AZ_CLASS_ALLOCATOR_IMPL(WhiteBoxModule, AZ::SystemAllocator)
  15. WhiteBoxModule::WhiteBoxModule()
  16. : CryHooksModule()
  17. {
  18. // push results of [MyComponent]::CreateDescriptor() into m_descriptors here
  19. m_descriptors.insert(
  20. m_descriptors.end(),
  21. {
  22. WhiteBoxSystemComponent::CreateDescriptor(),
  23. WhiteBoxColliderComponent::CreateDescriptor(),
  24. WhiteBoxComponent::CreateDescriptor(),
  25. });
  26. }
  27. WhiteBoxModule::~WhiteBoxModule()
  28. {
  29. }
  30. AZ::ComponentTypeList WhiteBoxModule::GetRequiredSystemComponents() const
  31. {
  32. // add required SystemComponents to the SystemEntity
  33. return AZ::ComponentTypeList{azrtti_typeid<WhiteBoxSystemComponent>()};
  34. }
  35. } // namespace WhiteBox
  36. #if !defined(WHITE_BOX_EDITOR)
  37. #if defined(O3DE_GEM_NAME)
  38. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), WhiteBox::WhiteBoxModule)
  39. #else
  40. AZ_DECLARE_MODULE_CLASS(Gem_WhiteBox, WhiteBox::WhiteBoxModule)
  41. #endif
  42. #endif // !defined(WHITE_BOX_EDITOR)