ScriptRunnerBus.h 940 B

12345678910111213141516171819202122232425262728293031
  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. #pragma once
  9. #include <AzCore/std/string/string_view.h>
  10. #include <AzCore/EBus/EBus.h>
  11. namespace AtomSampleViewer
  12. {
  13. class ScriptRunnerRequests
  14. : public AZ::EBusTraits
  15. {
  16. public:
  17. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  18. //! Can be used by sample components to temporarily pause script processing, for example
  19. //! to delay until some required resources are loaded and initialized.
  20. virtual void PauseScript() = 0;
  21. virtual void PauseScriptWithTimeout(float timeout) = 0;
  22. virtual void ResumeScript() = 0;
  23. };
  24. using ScriptRunnerRequestBus = AZ::EBus<ScriptRunnerRequests>;
  25. } // namespace AtomSampleViewer