${Name}SystemComponent.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // {BEGIN_LICENSE}
  2. /*
  3. * Copyright (c) Contributors to the Open 3D Engine Project.
  4. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  5. *
  6. * SPDX-License-Identifier: Apache-2.0 OR MIT
  7. *
  8. */
  9. // {END_LICENSE}
  10. #pragma once
  11. #include <AzCore/Component/Component.h>
  12. #include <AzCore/Component/TickBus.h>
  13. #include <${Name}/${Name}Bus.h>
  14. namespace ${SanitizedCppName}
  15. {
  16. class ${SanitizedCppName}SystemComponent
  17. : public AZ::Component
  18. , protected ${SanitizedCppName}RequestBus::Handler
  19. , public AZ::TickBus::Handler
  20. {
  21. public:
  22. AZ_COMPONENT_DECL(${SanitizedCppName}SystemComponent);
  23. static void Reflect(AZ::ReflectContext* context);
  24. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  25. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  26. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  27. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  28. ${SanitizedCppName}SystemComponent();
  29. ~${SanitizedCppName}SystemComponent();
  30. protected:
  31. ////////////////////////////////////////////////////////////////////////
  32. // ${SanitizedCppName}RequestBus interface implementation
  33. ////////////////////////////////////////////////////////////////////////
  34. ////////////////////////////////////////////////////////////////////////
  35. // AZ::Component interface implementation
  36. void Init() override;
  37. void Activate() override;
  38. void Deactivate() override;
  39. ////////////////////////////////////////////////////////////////////////
  40. ////////////////////////////////////////////////////////////////////////
  41. // AZTickBus interface implementation
  42. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  43. ////////////////////////////////////////////////////////////////////////
  44. };
  45. } // namespace ${SanitizedCppName}