Engine.xml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Engine" inherits="Object" category="Core" version="3.0.alpha.custom_build">
  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_frames_drawn">
  15. <return type="int">
  16. </return>
  17. <description>
  18. Returns the total number of frames drawn.
  19. </description>
  20. </method>
  21. <method name="get_frames_per_second" qualifiers="const">
  22. <return type="float">
  23. </return>
  24. <description>
  25. Returns the frames per second of the running game.
  26. </description>
  27. </method>
  28. <method name="get_iterations_per_second" qualifiers="const">
  29. <return type="int">
  30. </return>
  31. <description>
  32. Returns the number of fixed iterations per second (for fixed process and physics).
  33. </description>
  34. </method>
  35. <method name="get_main_loop" qualifiers="const">
  36. <return type="MainLoop">
  37. </return>
  38. <description>
  39. Returns the main loop object (see [MainLoop] and [SceneTree]).
  40. </description>
  41. </method>
  42. <method name="get_target_fps" qualifiers="const">
  43. <return type="float">
  44. </return>
  45. <description>
  46. Returns the desired frames per second. If the hardware cannot keep up, this setting may not be respected. It defaults to 0, which indicates no limit.
  47. </description>
  48. </method>
  49. <method name="get_time_scale">
  50. <return type="float">
  51. </return>
  52. <description>
  53. Returns 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.
  54. </description>
  55. </method>
  56. <method name="get_version_info" qualifiers="const">
  57. <return type="Dictionary">
  58. </return>
  59. <description>
  60. Returns the current engine version information in a Dictionary.
  61. "major" - Holds the major version number as a String
  62. "minor" - Holds the minor version number as a String
  63. "patch" - Holds the patch version number as a String
  64. "status" - Holds the status (e.g. "beta", "rc1", "rc2", ... "stable") as a String
  65. "revision" - Holds the revision (e.g. "custom-build") as a String
  66. "string" - major + minor + patch + status + revision in a single String
  67. </description>
  68. </method>
  69. <method name="is_editor_hint" qualifiers="const">
  70. <return type="bool">
  71. </return>
  72. <description>
  73. Returns [code]true[/code] if the editor is running.
  74. </description>
  75. </method>
  76. <method name="is_in_physics_frame" qualifiers="const">
  77. <return type="bool">
  78. </return>
  79. <description>
  80. Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop.
  81. </description>
  82. </method>
  83. <method name="set_editor_hint">
  84. <return type="void">
  85. </return>
  86. <argument index="0" name="enabled" type="bool">
  87. </argument>
  88. <description>
  89. Sets the running inside the editor hint if [code]enabled[/code] is [code]true[/code].
  90. </description>
  91. </method>
  92. <method name="set_iterations_per_second">
  93. <return type="void">
  94. </return>
  95. <argument index="0" name="iterations_per_second" type="int">
  96. </argument>
  97. <description>
  98. Sets the number of fixed iterations per second (for fixed process and physics).
  99. </description>
  100. </method>
  101. <method name="set_target_fps">
  102. <return type="void">
  103. </return>
  104. <argument index="0" name="target_fps" type="int">
  105. </argument>
  106. <description>
  107. Sets the target frames per second.
  108. </description>
  109. </method>
  110. <method name="set_time_scale">
  111. <return type="void">
  112. </return>
  113. <argument index="0" name="time_scale" type="float">
  114. </argument>
  115. <description>
  116. Sets the time scale.
  117. </description>
  118. </method>
  119. </methods>
  120. <constants>
  121. </constants>
  122. </class>