Engine.xml 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Engine" inherits="Object" category="Core" version="3.1">
  3. <brief_description>
  4. Access to basic engine properties.
  5. </brief_description>
  6. <description>
  7. The [code]Engine[/code] class allows you to query and modify the game's run-time parameters, such as frames per second, time scale, and others.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="get_author_info" qualifiers="const">
  15. <return type="Dictionary">
  16. </return>
  17. <description>
  18. Returns engine author information in a Dictionary.
  19. "lead_developers" - Array of Strings, lead developer names
  20. "founders" - Array of Strings, founder names
  21. "project_managers" - Array of Strings, project manager names
  22. "developers" - Array of Strings, developer names
  23. </description>
  24. </method>
  25. <method name="get_copyright_info" qualifiers="const">
  26. <return type="Array">
  27. </return>
  28. <description>
  29. Returns an Array of copyright information Dictionaries.
  30. "name" - String, component name
  31. "parts" - Array of Dictionaries {"files", "copyright", "license"} describing subsections of the component
  32. </description>
  33. </method>
  34. <method name="get_donor_info" qualifiers="const">
  35. <return type="Dictionary">
  36. </return>
  37. <description>
  38. Returns a Dictionary of Arrays of donor names.
  39. {"platinum_sponsors", "gold_sponsors", "mini_sponsors", "gold_donors", "silver_donors", "bronze_donors"}
  40. </description>
  41. </method>
  42. <method name="get_frames_drawn">
  43. <return type="int">
  44. </return>
  45. <description>
  46. Returns the total number of frames drawn.
  47. </description>
  48. </method>
  49. <method name="get_frames_per_second" qualifiers="const">
  50. <return type="float">
  51. </return>
  52. <description>
  53. Returns the frames per second of the running game.
  54. </description>
  55. </method>
  56. <method name="get_license_info" qualifiers="const">
  57. <return type="Dictionary">
  58. </return>
  59. <description>
  60. Returns Dictionary of licenses used by Godot and included third party components.
  61. </description>
  62. </method>
  63. <method name="get_license_text" qualifiers="const">
  64. <return type="String">
  65. </return>
  66. <description>
  67. Returns Godot license text.
  68. </description>
  69. </method>
  70. <method name="get_main_loop" qualifiers="const">
  71. <return type="MainLoop">
  72. </return>
  73. <description>
  74. Returns the main loop object (see [MainLoop] and [SceneTree]).
  75. </description>
  76. </method>
  77. <method name="get_singleton" qualifiers="const">
  78. <return type="Object">
  79. </return>
  80. <argument index="0" name="name" type="String">
  81. </argument>
  82. <description>
  83. </description>
  84. </method>
  85. <method name="get_version_info" qualifiers="const">
  86. <return type="Dictionary">
  87. </return>
  88. <description>
  89. Returns the current engine version information in a Dictionary.
  90. "major" - Holds the major version number as an int
  91. "minor" - Holds the minor version number as an int
  92. "patch" - Holds the patch version number as an int
  93. "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
  94. "build" - Holds the build name (e.g. "custom-build") as a String
  95. "string" - major + minor + patch + status + build in a single String
  96. </description>
  97. </method>
  98. <method name="has_singleton" qualifiers="const">
  99. <return type="bool">
  100. </return>
  101. <argument index="0" name="name" type="String">
  102. </argument>
  103. <description>
  104. </description>
  105. </method>
  106. <method name="is_in_physics_frame" qualifiers="const">
  107. <return type="bool">
  108. </return>
  109. <description>
  110. Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop.
  111. </description>
  112. </method>
  113. </methods>
  114. <members>
  115. <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint">
  116. If [code]true[/code], it is running inside the editor. Useful for tool scripts.
  117. </member>
  118. <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second">
  119. The number of fixed iterations per second (for fixed process and physics).
  120. </member>
  121. <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix">
  122. </member>
  123. <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps">
  124. The desired frames per second. If the hardware cannot keep up, this setting may not be respected. Defaults to 0, which indicates no limit.
  125. </member>
  126. <member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale">
  127. 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.
  128. </member>
  129. </members>
  130. <constants>
  131. </constants>
  132. </class>