ScriptRunnerBus.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
  3. * its licensors.
  4. *
  5. * For complete copyright and license terms please see the LICENSE at the root of this
  6. * distribution (the "License"). All use of this software is governed by the License,
  7. * or, if provided, by the license below or the license accompanying this file. Do not
  8. * remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
  9. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. *
  11. */
  12. #pragma once
  13. #include <AzCore/std/string/string_view.h>
  14. #include <AzCore/EBus/EBus.h>
  15. namespace AtomSampleViewer
  16. {
  17. class ScriptRunnerRequests
  18. : public AZ::EBusTraits
  19. {
  20. public:
  21. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ::EBusHandlerPolicy::Single;
  22. //! Can be used by sample components to temporarily pause script processing, for example
  23. //! to delay until some required resources are loaded and initialized.
  24. virtual void PauseScript() = 0;
  25. virtual void PauseScriptWithTimeout(float timeout) = 0;
  26. virtual void ResumeScript() = 0;
  27. };
  28. using ScriptRunnerRequestBus = AZ::EBus<ScriptRunnerRequests>;
  29. } // namespace AtomSampleViewer