Engine.pkg 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. $#include "Engine.h"
  2. /// Urho3D engine. Creates the other subsystems.
  3. class Engine : public Object
  4. {
  5. public:
  6. /// Run one frame.
  7. void RunFrame();
  8. /// Create the console and return it. May return null if engine configuration does not allow creation (headless mode.)
  9. Console* CreateConsole();
  10. /// Create the debug hud.
  11. DebugHud* CreateDebugHud();
  12. /// Set minimum frames per second. If FPS goes lower than this, time will appear to slow down.
  13. void SetMinFps(int fps);
  14. /// Set maximum frames per second. The engine will sleep if FPS is higher than this.
  15. void SetMaxFps(int fps);
  16. /// Set maximum frames per second when the application does not have input focus.
  17. void SetMaxInactiveFps(int fps);
  18. /// Set whether to pause update events and audio when minimized.
  19. void SetPauseMinimized(bool enable);
  20. /// Set whether to exit automatically on exit request (window close button.)
  21. void SetAutoExit(bool enable);
  22. /// Close the application window and set the exit flag.
  23. void Exit();
  24. /// Dump profiling information to the log.
  25. void DumpProfiler();
  26. /// Dump information of all resources to the log.
  27. void DumpResources();
  28. /// Dump information of all memory allocations to the log. Supported in MSVC debug mode only.
  29. void DumpMemory();
  30. /// Return the minimum frames per second.
  31. int GetMinFps() const;
  32. /// Return the maximum frames per second.
  33. int GetMaxFps() const;
  34. /// Return the maximum frames per second when the application does not have input focus.
  35. int GetMaxInactiveFps() const;
  36. /// Return whether to pause update events and audio when minimized.
  37. bool GetPauseMinimized() const;
  38. /// Return whether to exit automatically on exit request.
  39. bool GetAutoExit() const;
  40. /// Return whether engine has been initialized.
  41. bool IsInitialized() const;
  42. /// Return whether exit has been requested.
  43. bool IsExiting() const;
  44. /// Return whether the engine has been created in headless mode.
  45. bool IsHeadless() const;
  46. // Properties:
  47. tolua_property__get_set int minFps;
  48. tolua_property__get_set int maxFps;
  49. tolua_property__get_set int maxInactiveFps;
  50. tolua_property__get_set bool pauseMinimized;
  51. tolua_property__get_set bool autoExit;
  52. tolua_readonly tolua_property__is_set bool initialized;
  53. tolua_readonly tolua_property__is_set bool exiting;
  54. tolua_readonly tolua_property__is_set bool headless;
  55. };