NetworkRandomComponent.h 855 B

1234567891011121314151617181920212223242526272829
  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/NetworkRandomComponent.AutoComponent.h>
  9. namespace MultiplayerSample
  10. {
  11. class NetworkRandomComponentController
  12. : public NetworkRandomComponentControllerBase
  13. {
  14. public:
  15. explicit NetworkRandomComponentController(NetworkRandomComponent& parent);
  16. void OnActivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;
  17. void OnDeactivate(Multiplayer::EntityIsMigrating entityIsMigrating) override;
  18. uint64_t GetRandomUint64();
  19. int GetRandomInt();
  20. //! Returns a float in the range of [0,1)
  21. float GetRandomFloat();
  22. };
  23. }