class_engine.rst 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Engine.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Engine:
  5. Engine
  6. ======
  7. **Inherits:** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Access to basic engine properties.
  12. Member Functions
  13. ----------------
  14. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  15. | :ref:`Dictionary<class_dictionary>` | :ref:`get_author_info<class_Engine_get_author_info>` **(** **)** const |
  16. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  17. | :ref:`Array<class_array>` | :ref:`get_copyright_info<class_Engine_get_copyright_info>` **(** **)** const |
  18. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  19. | :ref:`Dictionary<class_dictionary>` | :ref:`get_donor_info<class_Engine_get_donor_info>` **(** **)** const |
  20. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  21. | :ref:`int<class_int>` | :ref:`get_frames_drawn<class_Engine_get_frames_drawn>` **(** **)** |
  22. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`get_frames_per_second<class_Engine_get_frames_per_second>` **(** **)** const |
  24. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  25. | :ref:`Dictionary<class_dictionary>` | :ref:`get_license_info<class_Engine_get_license_info>` **(** **)** const |
  26. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  27. | :ref:`String<class_string>` | :ref:`get_license_text<class_Engine_get_license_text>` **(** **)** const |
  28. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  29. | :ref:`MainLoop<class_mainloop>` | :ref:`get_main_loop<class_Engine_get_main_loop>` **(** **)** const |
  30. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  31. | :ref:`Object<class_object>` | :ref:`get_singleton<class_Engine_get_singleton>` **(** :ref:`String<class_string>` name **)** const |
  32. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  33. | :ref:`Dictionary<class_dictionary>` | :ref:`get_version_info<class_Engine_get_version_info>` **(** **)** const |
  34. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  35. | :ref:`bool<class_bool>` | :ref:`has_singleton<class_Engine_has_singleton>` **(** :ref:`String<class_string>` name **)** const |
  36. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  37. | :ref:`bool<class_bool>` | :ref:`is_in_physics_frame<class_Engine_is_in_physics_frame>` **(** **)** const |
  38. +--------------------------------------+-----------------------------------------------------------------------------------------------------+
  39. Member Variables
  40. ----------------
  41. .. _class_Engine_editor_hint:
  42. - :ref:`bool<class_bool>` **editor_hint** - If ``true``, it is running inside the editor. Useful for tool scripts.
  43. .. _class_Engine_iterations_per_second:
  44. - :ref:`int<class_int>` **iterations_per_second** - The number of fixed iterations per second (for fixed process and physics).
  45. .. _class_Engine_physics_jitter_fix:
  46. - :ref:`float<class_float>` **physics_jitter_fix**
  47. .. _class_Engine_target_fps:
  48. - :ref:`int<class_int>` **target_fps** - The desired frames per second. If the hardware cannot keep up, this setting may not be respected. Defaults to 0, which indicates no limit.
  49. .. _class_Engine_time_scale:
  50. - :ref:`float<class_float>` **time_scale** - Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed.
  51. Description
  52. -----------
  53. The ``Engine`` class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others.
  54. Member Function Description
  55. ---------------------------
  56. .. _class_Engine_get_author_info:
  57. - :ref:`Dictionary<class_dictionary>` **get_author_info** **(** **)** const
  58. Returns engine author information in a Dictionary.
  59. "lead_developers" - Array of Strings, lead developer names
  60. "founders" - Array of Strings, founder names
  61. "project_managers" - Array of Strings, project manager names
  62. "developers" - Array of Strings, developer names
  63. .. _class_Engine_get_copyright_info:
  64. - :ref:`Array<class_array>` **get_copyright_info** **(** **)** const
  65. Returns an Array of copyright information Dictionaries.
  66. "name" - String, component name
  67. "parts" - Array of Dictionaries {"files", "copyright", "license"} describing subsections of the component
  68. .. _class_Engine_get_donor_info:
  69. - :ref:`Dictionary<class_dictionary>` **get_donor_info** **(** **)** const
  70. Returns a Dictionary of Arrays of donor names.
  71. {"platinum_sponsors", "gold_sponsors", "mini_sponsors", "gold_donors", "silver_donors", "bronze_donors"}
  72. .. _class_Engine_get_frames_drawn:
  73. - :ref:`int<class_int>` **get_frames_drawn** **(** **)**
  74. Returns the total number of frames drawn.
  75. .. _class_Engine_get_frames_per_second:
  76. - :ref:`float<class_float>` **get_frames_per_second** **(** **)** const
  77. Returns the frames per second of the running game.
  78. .. _class_Engine_get_license_info:
  79. - :ref:`Dictionary<class_dictionary>` **get_license_info** **(** **)** const
  80. Returns Dictionary of licenses used by Godot and included third party components.
  81. .. _class_Engine_get_license_text:
  82. - :ref:`String<class_string>` **get_license_text** **(** **)** const
  83. Returns Godot license text.
  84. .. _class_Engine_get_main_loop:
  85. - :ref:`MainLoop<class_mainloop>` **get_main_loop** **(** **)** const
  86. Returns the main loop object (see :ref:`MainLoop<class_mainloop>` and :ref:`SceneTree<class_scenetree>`).
  87. .. _class_Engine_get_singleton:
  88. - :ref:`Object<class_object>` **get_singleton** **(** :ref:`String<class_string>` name **)** const
  89. .. _class_Engine_get_version_info:
  90. - :ref:`Dictionary<class_dictionary>` **get_version_info** **(** **)** const
  91. Returns the current engine version information in a Dictionary.
  92. "major" - Holds the major version number as an int
  93. "minor" - Holds the minor version number as an int
  94. "patch" - Holds the patch version number as an int
  95. "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
  96. "build" - Holds the build name (e.g. "custom-build") as a String
  97. "string" - major + minor + patch + status + build in a single String
  98. .. _class_Engine_has_singleton:
  99. - :ref:`bool<class_bool>` **has_singleton** **(** :ref:`String<class_string>` name **)** const
  100. .. _class_Engine_is_in_physics_frame:
  101. - :ref:`bool<class_bool>` **is_in_physics_frame** **(** **)** const
  102. Returns ``true`` if the game is inside the fixed process and physics phase of the game loop.