PhysicalSkyComponent.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 <SkyBox/PhysicalSkyComponent.h>
  9. #include <AzCore/RTTI/BehaviorContext.h>
  10. namespace AZ
  11. {
  12. namespace Render
  13. {
  14. PhysicalSkyComponent::PhysicalSkyComponent(const PhysicalSkyComponentConfig& config)
  15. : BaseClass(config)
  16. {
  17. }
  18. void PhysicalSkyComponent::Reflect(AZ::ReflectContext* context)
  19. {
  20. BaseClass::Reflect(context);
  21. if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
  22. {
  23. serializeContext->Class<PhysicalSkyComponent, BaseClass>();
  24. }
  25. if (auto behaviorContext = azrtti_cast<BehaviorContext*>(context))
  26. {
  27. behaviorContext->Class<PhysicalSkyComponent>()
  28. ->RequestBus("PhysicalSkyRequestBus")
  29. ->RequestBus("SkyBoxFogRequestBus");
  30. behaviorContext->ConstantProperty("PhysicalSkyComponentTypeId", BehaviorConstant(Uuid(PhysicalSkyComponentTypeId)))
  31. ->Attribute(AZ::Script::Attributes::Module, "render")
  32. ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Common);
  33. }
  34. }
  35. } // namespace Render
  36. } // namespace AZ