MultiplayerSampleModule.cpp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  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 <Components/PerfTest/NetworkPrefabSpawnerComponent.h>
  11. #include <Components/PerfTest/NetworkRandomImpulseComponent.h>
  12. #include <Components/PerfTest/NetworkTestSpawnerComponent.h>
  13. #include <Components/UiCanvasDemoPlacardComponent.h>
  14. #include <Source/AutoGen/AutoComponentTypes.h>
  15. #include "MultiplayerSampleSystemComponent.h"
  16. namespace MultiplayerSample
  17. {
  18. class MultiplayerSampleModule
  19. : public AZ::Module
  20. {
  21. public:
  22. AZ_RTTI(MultiplayerSampleModule, "{9323FFB1-54AB-4665-889B-166CA2418C7C}", AZ::Module);
  23. AZ_CLASS_ALLOCATOR(MultiplayerSampleModule, AZ::SystemAllocator, 0);
  24. MultiplayerSampleModule()
  25. : AZ::Module()
  26. {
  27. // Push results of [MyComponent]::CreateDescriptor() into m_descriptors here.
  28. m_descriptors.insert(m_descriptors.end(), {
  29. MultiplayerSampleSystemComponent::CreateDescriptor(),
  30. ExampleFilteredEntityComponent::CreateDescriptor(),
  31. NetworkPrefabSpawnerComponent::CreateDescriptor(),
  32. UiCanvasDemoPlacardComponent::CreateDescriptor()
  33. });
  34. CreateComponentDescriptors(m_descriptors);
  35. }
  36. /**
  37. * Add required SystemComponents to the SystemEntity.
  38. */
  39. AZ::ComponentTypeList GetRequiredSystemComponents() const override
  40. {
  41. return AZ::ComponentTypeList{
  42. azrtti_typeid<MultiplayerSampleSystemComponent>(),
  43. };
  44. }
  45. };
  46. }
  47. // DO NOT MODIFY THIS LINE UNLESS YOU RENAME THE GEM
  48. // The first parameter should be GemName_GemIdLower
  49. // The second should be the fully qualified name of the class above
  50. AZ_DECLARE_MODULE_CLASS(Gem_MultiplayerSample, MultiplayerSample::MultiplayerSampleModule)