2
0

MultiplayerSampleSystemComponent.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project. For complete copyright and license terms please see the LICENSE at the root of this distribution.
  3. *
  4. * SPDX-License-Identifier: Apache-2.0 OR MIT
  5. *
  6. */
  7. #pragma once
  8. #include <AzCore/Component/Component.h>
  9. #include <AzCore/Component/TickBus.h>
  10. namespace AzNetworking
  11. {
  12. class INetworkInterface;
  13. }
  14. namespace MultiplayerSample
  15. {
  16. class MultiplayerSampleSystemComponent
  17. : public AZ::Component
  18. , public AZ::TickBus::Handler
  19. {
  20. public:
  21. AZ_COMPONENT(MultiplayerSampleSystemComponent, "{7BF68D79-E870-44B5-853A-BA68FF4F0B90}");
  22. static void Reflect(AZ::ReflectContext* context);
  23. static void GetProvidedServices(AZ::ComponentDescriptor::DependencyArrayType& provided);
  24. static void GetIncompatibleServices(AZ::ComponentDescriptor::DependencyArrayType& incompatible);
  25. static void GetRequiredServices(AZ::ComponentDescriptor::DependencyArrayType& required);
  26. static void GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent);
  27. protected:
  28. ////////////////////////////////////////////////////////////////////////
  29. // AZ::Component interface implementation
  30. void Init() override;
  31. void Activate() override;
  32. void Deactivate() override;
  33. ////////////////////////////////////////////////////////////////////////
  34. // AZ::TickBus::Handler overrides
  35. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  36. int GetTickOrder() override;
  37. ////////////////////////////////////////////////////////////////////////
  38. private:
  39. AzNetworking::INetworkInterface* m_networkInterface = nullptr;
  40. };
  41. }