Protect-the-MoonSystemComponent.cpp 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #include <AzCore/Serialization/SerializeContext.h>
  2. #include "Protect-the-MoonSystemComponent.h"
  3. #include <Protect-the-Moon/Protect-the-MoonTypeIds.h>
  4. namespace Protect_the_Moon
  5. {
  6. AZ_COMPONENT_IMPL(Protect_the_MoonSystemComponent, "Protect_the_MoonSystemComponent",
  7. Protect_the_MoonSystemComponentTypeId);
  8. void Protect_the_MoonSystemComponent::Reflect(AZ::ReflectContext* context)
  9. {
  10. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  11. {
  12. serializeContext->Class<Protect_the_MoonSystemComponent, AZ::Component>()
  13. ->Version(0)
  14. ;
  15. }
  16. }
  17. void Protect_the_MoonSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  18. {
  19. provided.push_back(AZ_CRC_CE("Protect_the_MoonService"));
  20. }
  21. void Protect_the_MoonSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  22. {
  23. incompatible.push_back(AZ_CRC_CE("Protect_the_MoonService"));
  24. }
  25. void Protect_the_MoonSystemComponent::GetRequiredServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& required)
  26. {
  27. }
  28. void Protect_the_MoonSystemComponent::GetDependentServices([[maybe_unused]] AZ::ComponentDescriptor::DependencyArrayType& dependent)
  29. {
  30. }
  31. Protect_the_MoonSystemComponent::Protect_the_MoonSystemComponent()
  32. {
  33. if (Protect_the_MoonInterface::Get() == nullptr)
  34. {
  35. Protect_the_MoonInterface::Register(this);
  36. }
  37. }
  38. Protect_the_MoonSystemComponent::~Protect_the_MoonSystemComponent()
  39. {
  40. if (Protect_the_MoonInterface::Get() == this)
  41. {
  42. Protect_the_MoonInterface::Unregister(this);
  43. }
  44. }
  45. void Protect_the_MoonSystemComponent::Init()
  46. {
  47. }
  48. void Protect_the_MoonSystemComponent::Activate()
  49. {
  50. Protect_the_MoonRequestBus::Handler::BusConnect();
  51. }
  52. void Protect_the_MoonSystemComponent::Deactivate()
  53. {
  54. Protect_the_MoonRequestBus::Handler::BusDisconnect();
  55. }
  56. }