2
0

SamplesSystemComponent.cpp 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #include <AzCore/Serialization/SerializeContext.h>
  2. #include <AzCore/Serialization/EditContext.h>
  3. #include <AzCore/Serialization/EditContextConstants.inl>
  4. #include "SamplesSystemComponent.h"
  5. namespace Samples
  6. {
  7. void SamplesSystemComponent::Reflect(AZ::ReflectContext* context)
  8. {
  9. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  10. {
  11. serialize->Class<SamplesSystemComponent, AZ::Component>()
  12. ->Version(0)
  13. ;
  14. if (AZ::EditContext* ec = serialize->GetEditContext())
  15. {
  16. ec->Class<SamplesSystemComponent>("Samples", "[Description of functionality provided by this System Component]")
  17. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  18. ->Attribute(AZ::Edit::Attributes::AppearsInAddComponentMenu, AZ_CRC("System"))
  19. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  20. ;
  21. }
  22. }
  23. }
  24. void SamplesSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  25. {
  26. provided.push_back(AZ_CRC("SamplesService"));
  27. }
  28. void SamplesSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  29. {
  30. incompatible.push_back(AZ_CRC("SamplesService"));
  31. }
  32. void SamplesSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  33. {
  34. AZ_UNUSED(required);
  35. }
  36. void SamplesSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
  37. {
  38. AZ_UNUSED(dependent);
  39. }
  40. void SamplesSystemComponent::Init()
  41. {
  42. }
  43. void SamplesSystemComponent::Activate()
  44. {
  45. SamplesRequestBus::Handler::BusConnect();
  46. }
  47. void SamplesSystemComponent::Deactivate()
  48. {
  49. SamplesRequestBus::Handler::BusDisconnect();
  50. }
  51. }