Преглед на файлове

Made CharacterComponent incompatible with network rigid body component

Signed-off-by: pereslav <[email protected]>
pereslav преди 4 години
родител
ревизия
fdcfc962cf
променени са 2 файла, в които са добавени 10 реда и са изтрити 0 реда
  1. 5 0
      Gem/Code/Source/Components/CharacterComponent.h
  2. 5 0
      Gem/Code/Source/Components/NetworkRigidBodyComponent.h

+ 5 - 0
Gem/Code/Source/Components/CharacterComponent.h

@@ -31,6 +31,11 @@ namespace MultiplayerSample
 
         CharacterComponent();
 
+        static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
+        {
+            incompatible.push_back(AZ_CRC_CE("NetworkRigidBodyService"));
+        }
+
         void OnInit() override;
         void OnActivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;
         void OnDeactivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;

+ 5 - 0
Gem/Code/Source/Components/NetworkRigidBodyComponent.h

@@ -35,6 +35,11 @@ namespace MultiplayerSample
 
         NetworkRigidBodyComponent();
 
+        static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
+        {
+            provided.push_back(AZ_CRC_CE("NetworkRigidBodyService"));
+        }
+
         static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
         {
             required.push_back(AZ_CRC_CE("PhysXRigidBodyService"));