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