ScriptEventsGem.cpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 "ScriptEventsSystemComponent.h"
  9. #include <AzCore/Memory/SystemAllocator.h>
  10. #include <ScriptEvents/ScriptEventsGem.h>
  11. namespace ScriptEvents
  12. {
  13. ScriptEventsModule::ScriptEventsModule()
  14. : AZ::Module()
  15. , m_systemImpl(nullptr)
  16. {
  17. ScriptEventModuleConfigurationRequestBus::Handler::BusConnect();
  18. m_descriptors.insert(m_descriptors.end(), {
  19. ScriptEvents::ScriptEventsSystemComponent::CreateDescriptor()
  20. });
  21. }
  22. ScriptEventsSystemComponentImpl* ScriptEventsModule::GetSystemComponentImpl()
  23. {
  24. if (!m_systemImpl)
  25. {
  26. m_systemImpl = aznew ScriptEventsSystemComponentRuntimeImpl();
  27. }
  28. return m_systemImpl;
  29. }
  30. /**
  31. * Add required SystemComponents to the SystemEntity.
  32. */
  33. AZ::ComponentTypeList ScriptEventsModule::GetRequiredSystemComponents() const
  34. {
  35. return AZ::ComponentTypeList{
  36. azrtti_typeid<ScriptEvents::ScriptEventsSystemComponent>(),
  37. };
  38. }
  39. }
  40. #if defined(O3DE_GEM_NAME)
  41. AZ_DECLARE_MODULE_CLASS(AZ_JOIN(Gem_, O3DE_GEM_NAME), ScriptEvents::ScriptEventsModule)
  42. #else
  43. AZ_DECLARE_MODULE_CLASS(Gem_ScriptEvents, ScriptEvents::ScriptEventsModule)
  44. #endif