AEEditorApp.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. //
  2. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  3. // LICENSE: Atomic Game Engine Editor and Tools EULA
  4. // Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
  5. // license information: https://github.com/AtomicGameEngine/AtomicGameEngine
  6. //
  7. #pragma once
  8. #include "AEEditorCommon.h"
  9. using namespace Atomic;
  10. namespace Atomic
  11. {
  12. class JSVM;
  13. }
  14. namespace AtomicEditor
  15. {
  16. class AEEditorApp : public AEEditorCommon
  17. {
  18. OBJECT(AEEditorApp);
  19. public:
  20. /// Construct.
  21. AEEditorApp(Context* context);
  22. /// Setup before engine initialization. Verify that a script file has been specified.
  23. virtual void Setup();
  24. /// Setup after engine initialization. Load the script and execute its start function.
  25. virtual void Start();
  26. /// Cleanup after the main loop. Run the script's stop function if it exists.
  27. virtual void Stop();
  28. private:
  29. void HandleExitRequested(StringHash eventType, VariantMap& eventData);
  30. void HandleJSError(StringHash eventType, VariantMap& eventData);
  31. };
  32. }