SimplePlayerCameraComponent.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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 <Source/AutoGen/SimplePlayerCameraComponent.AutoComponent.h>
  9. #include <AzCore/Component/TickBus.h>
  10. namespace MultiplayerSample
  11. {
  12. class SimplePlayerCameraComponentController
  13. : public SimplePlayerCameraComponentControllerBase
  14. , private AZ::TickBus::Handler
  15. {
  16. public:
  17. SimplePlayerCameraComponentController(SimplePlayerCameraComponent& parent);
  18. void OnActivate(Multiplayer::EntityIsMigrating entityIsMigrating);
  19. void OnDeactivate(Multiplayer::EntityIsMigrating entityIsMigrating);
  20. float GetCameraYaw() const;
  21. float GetCameraPitch() const;
  22. float GetCameraRoll() const;
  23. private:
  24. //! AZ::TickBus interface
  25. //! @{
  26. void OnTick(float deltaTime, AZ::ScriptTimePoint time) override;
  27. int GetTickOrder() override;
  28. //! @}
  29. AZ::Entity* m_activeCameraEntity = nullptr;
  30. };
  31. }