3
0

ScriptCanvasPhysicsSystemComponent.cpp 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  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 <AzCore/Serialization/SerializeContext.h>
  9. #include <AzCore/Serialization/EditContext.h>
  10. #include <AzCore/RTTI/BehaviorContext.h>
  11. #include "ScriptCanvasPhysicsSystemComponent.h"
  12. #include <AutoGenFunctionRegistry.generated.h>
  13. REGISTER_SCRIPTCANVAS_AUTOGEN_FUNCTION(ScriptCanvasPhysicsStatic);
  14. namespace ScriptCanvasPhysics
  15. {
  16. void ScriptCanvasPhysicsSystemComponent::Reflect(AZ::ReflectContext* context)
  17. {
  18. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  19. {
  20. serialize->Class<ScriptCanvasPhysicsSystemComponent, AZ::Component>()
  21. ->Version(0);
  22. if (AZ::EditContext* ec = serialize->GetEditContext())
  23. {
  24. ec->Class<ScriptCanvasPhysicsSystemComponent>("ScriptCanvasPhysics", "Exposes legacy physics features to scripting through the Behavior Context to Lua and Script Canvas.")
  25. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  26. ->Attribute(AZ::Script::Attributes::Category, "Physics")
  27. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  28. ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly)
  29. ;
  30. }
  31. }
  32. }
  33. void ScriptCanvasPhysicsSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  34. {
  35. provided.push_back(AZ_CRC("ScriptCanvasPhysicsService", 0x4686eefd));
  36. }
  37. void ScriptCanvasPhysicsSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  38. {
  39. incompatible.push_back(AZ_CRC("ScriptCanvasPhysicsService", 0x4686eefd));
  40. }
  41. void ScriptCanvasPhysicsSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  42. {
  43. required.push_back(AZ_CRC("LmbrCentralService", 0xc3a02410));
  44. }
  45. void ScriptCanvasPhysicsSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
  46. {
  47. (void)dependent;
  48. }
  49. void ScriptCanvasPhysicsSystemComponent::Init()
  50. {
  51. }
  52. void ScriptCanvasPhysicsSystemComponent::Activate()
  53. {
  54. }
  55. void ScriptCanvasPhysicsSystemComponent::Deactivate()
  56. {
  57. }
  58. }