MultiplayerSampleModule.cpp 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project
  3. *
  4. * SPDX-License-Identifier: Apache-2.0 OR MIT
  5. *
  6. */
  7. #include <AzCore/Memory/SystemAllocator.h>
  8. #include <AzCore/Module/Module.h>
  9. #include <Components/ExampleFilteredEntityComponent.h>
  10. #include <Source/AutoGen/AutoComponentTypes.h>
  11. #include "MultiplayerSampleSystemComponent.h"
  12. namespace MultiplayerSample
  13. {
  14. class MultiplayerSampleModule
  15. : public AZ::Module
  16. {
  17. public:
  18. AZ_RTTI(MultiplayerSampleModule, "{9323FFB1-54AB-4665-889B-166CA2418C7C}", AZ::Module);
  19. AZ_CLASS_ALLOCATOR(MultiplayerSampleModule, AZ::SystemAllocator, 0);
  20. MultiplayerSampleModule()
  21. : AZ::Module()
  22. {
  23. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  24. m_descriptors.insert(m_descriptors.end(), {
  25. MultiplayerSampleSystemComponent::CreateDescriptor(),
  26. ExampleFilteredEntityComponent::CreateDescriptor(),
  27. });
  28. CreateComponentDescriptors(m_descriptors);
  29. }
  30. /**
  31. * Add required SystemComponents to the SystemEntity.
  32. */
  33. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  34. {
  35. return AZ::ComponentTypeList{
  36. azrtti_typeid<MultiplayerSampleSystemComponent>(),
  37. };
  38. }
  39. };
  40. }
  41. // DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
  42. // The first parameter should be GemName_GemIdLower
  43. // The second should be the fully qualified name of the class above
  44. AZ_DECLARE_MODULE_CLASS(Gem_MultiplayerSample, MultiplayerSample::MultiplayerSampleModule)