FastNoiseSystemComponent.cpp 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 "FastNoiseSystemComponent.h"
  11. namespace FastNoiseGem
  12. {
  13. void FastNoiseSystemComponent::Reflect(AZ::ReflectContext* context)
  14. {
  15. if (AZ::SerializeContext* serialize = azrtti_cast<AZ::SerializeContext*>(context))
  16. {
  17. serialize->Class<FastNoiseSystemComponent, AZ::Component>()
  18. ->Version(0)
  19. ;
  20. if (AZ::EditContext* ec = serialize->GetEditContext())
  21. {
  22. ec->Class<FastNoiseSystemComponent>("FastNoise", "System component for Fast Noise gradient gem")
  23. ->ClassElement(AZ::Edit::ClassElements::EditorData, "")
  24. ->Attribute(AZ::Edit::Attributes::AutoExpand, true)
  25. ;
  26. }
  27. }
  28. }
  29. void FastNoiseSystemComponent::GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided)
  30. {
  31. provided.push_back(AZ_CRC_CE("FastNoiseService"));
  32. }
  33. void FastNoiseSystemComponent::GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible)
  34. {
  35. incompatible.push_back(AZ_CRC_CE("FastNoiseService"));
  36. }
  37. void FastNoiseSystemComponent::GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required)
  38. {
  39. (void)required;
  40. }
  41. void FastNoiseSystemComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent)
  42. {
  43. (void)dependent;
  44. }
  45. void FastNoiseSystemComponent::Init()
  46. {
  47. }
  48. void FastNoiseSystemComponent::Activate()
  49. {
  50. FastNoiseRequestBus::Handler::BusConnect();
  51. }
  52. void FastNoiseSystemComponent::Deactivate()
  53. {
  54. FastNoiseRequestBus::Handler::BusDisconnect();
  55. }
  56. }