AEPlayerApp.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 AtomicEditor
  11. {
  12. class AEPlayerApplication : public AEEditorCommon
  13. {
  14. OBJECT(AEPlayerApplication);
  15. public:
  16. /// Construct.
  17. AEPlayerApplication(Context* context);
  18. /// Setup before engine initialization. Verify that a script file has been specified.
  19. virtual void Setup();
  20. /// Setup after engine initialization. Load the script and execute its start function.
  21. virtual void Start();
  22. /// Cleanup after the main loop. Run the script's stop function if it exists.
  23. virtual void Stop();
  24. private:
  25. /// Handle reload start of the script file.
  26. void HandleScriptReloadStarted(StringHash eventType, VariantMap& eventData);
  27. /// Handle reload success of the script file.
  28. void HandleScriptReloadFinished(StringHash eventType, VariantMap& eventData);
  29. /// Handle reload failure of the script file.
  30. void HandleScriptReloadFailed(StringHash eventType, VariantMap& eventData);
  31. void HandleJSError(StringHash eventType, VariantMap& eventData);
  32. void HandleLogMessage(StringHash eventType, VariantMap& eventData);
  33. void HandleQuit(StringHash eventType, VariantMap& eventData);
  34. bool debugPlayer_;
  35. };
  36. }