class_particles2d.rst 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Particles2D:
  4. Particles2D
  5. ===========
  6. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Category:** Core
  8. Brief Description
  9. -----------------
  10. 2D Particle emitter
  11. Member Functions
  12. ----------------
  13. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  14. | :ref:`int<class_int>` | :ref:`get_amount<class_Particles2D_get_amount>` **(** **)** const |
  15. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  16. | :ref:`Color<class_color>` | :ref:`get_color<class_Particles2D_get_color>` **(** **)** const |
  17. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  18. | :ref:`Color<class_color>` | :ref:`get_color_phase_color<class_Particles2D_get_color_phase_color>` **(** :ref:`int<class_int>` phase **)** const |
  19. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  20. | :ref:`float<class_float>` | :ref:`get_color_phase_pos<class_Particles2D_get_color_phase_pos>` **(** :ref:`int<class_int>` phase **)** const |
  21. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  22. | :ref:`int<class_int>` | :ref:`get_color_phases<class_Particles2D_get_color_phases>` **(** **)** const |
  23. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  24. | :ref:`Vector2<class_vector2>` | :ref:`get_emission_half_extents<class_Particles2D_get_emission_half_extents>` **(** **)** const |
  25. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  26. | :ref:`PoolVector2Array<class_poolvector2array>` | :ref:`get_emission_points<class_Particles2D_get_emission_points>` **(** **)** const |
  27. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  28. | :ref:`Vector2<class_vector2>` | :ref:`get_emissor_offset<class_Particles2D_get_emissor_offset>` **(** **)** const |
  29. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  30. | :ref:`float<class_float>` | :ref:`get_emit_timeout<class_Particles2D_get_emit_timeout>` **(** **)** const |
  31. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  32. | :ref:`float<class_float>` | :ref:`get_explosiveness<class_Particles2D_get_explosiveness>` **(** **)** const |
  33. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  34. | :ref:`Gradient<class_gradient>` | :ref:`get_gradient<class_Particles2D_get_gradient>` **(** **)** const |
  35. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  36. | :ref:`int<class_int>` | :ref:`get_h_frames<class_Particles2D_get_h_frames>` **(** **)** const |
  37. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  38. | :ref:`Vector2<class_vector2>` | :ref:`get_initial_velocity<class_Particles2D_get_initial_velocity>` **(** **)** const |
  39. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  40. | :ref:`float<class_float>` | :ref:`get_lifetime<class_Particles2D_get_lifetime>` **(** **)** const |
  41. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  42. | :ref:`float<class_float>` | :ref:`get_param<class_Particles2D_get_param>` **(** :ref:`int<class_int>` param **)** const |
  43. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  44. | :ref:`float<class_float>` | :ref:`get_pre_process_time<class_Particles2D_get_pre_process_time>` **(** **)** const |
  45. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  46. | :ref:`int<class_int>` | :ref:`get_process_mode<class_Particles2D_get_process_mode>` **(** **)** const |
  47. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  48. | :ref:`float<class_float>` | :ref:`get_randomness<class_Particles2D_get_randomness>` **(** :ref:`int<class_int>` param **)** const |
  49. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  50. | :ref:`Texture<class_texture>` | :ref:`get_texture<class_Particles2D_get_texture>` **(** **)** const |
  51. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  52. | :ref:`float<class_float>` | :ref:`get_time_scale<class_Particles2D_get_time_scale>` **(** **)** const |
  53. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  54. | :ref:`int<class_int>` | :ref:`get_v_frames<class_Particles2D_get_v_frames>` **(** **)** const |
  55. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  56. | :ref:`bool<class_bool>` | :ref:`is_emitting<class_Particles2D_is_emitting>` **(** **)** const |
  57. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  58. | :ref:`bool<class_bool>` | :ref:`is_flipped_h<class_Particles2D_is_flipped_h>` **(** **)** const |
  59. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  60. | :ref:`bool<class_bool>` | :ref:`is_flipped_v<class_Particles2D_is_flipped_v>` **(** **)** const |
  61. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  62. | :ref:`bool<class_bool>` | :ref:`is_using_local_space<class_Particles2D_is_using_local_space>` **(** **)** const |
  63. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  64. | void | :ref:`pre_process<class_Particles2D_pre_process>` **(** :ref:`float<class_float>` time **)** |
  65. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  66. | void | :ref:`reset<class_Particles2D_reset>` **(** **)** |
  67. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  68. | void | :ref:`set_amount<class_Particles2D_set_amount>` **(** :ref:`int<class_int>` amount **)** |
  69. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  70. | void | :ref:`set_color<class_Particles2D_set_color>` **(** :ref:`Color<class_color>` color **)** |
  71. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  72. | void | :ref:`set_color_phase_color<class_Particles2D_set_color_phase_color>` **(** :ref:`int<class_int>` phase, :ref:`Color<class_color>` color **)** |
  73. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  74. | void | :ref:`set_color_phase_pos<class_Particles2D_set_color_phase_pos>` **(** :ref:`int<class_int>` phase, :ref:`float<class_float>` pos **)** |
  75. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  76. | void | :ref:`set_color_phases<class_Particles2D_set_color_phases>` **(** :ref:`int<class_int>` phases **)** |
  77. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  78. | void | :ref:`set_emission_half_extents<class_Particles2D_set_emission_half_extents>` **(** :ref:`Vector2<class_vector2>` extents **)** |
  79. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  80. | void | :ref:`set_emission_points<class_Particles2D_set_emission_points>` **(** :ref:`PoolVector2Array<class_poolvector2array>` points **)** |
  81. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  82. | void | :ref:`set_emissor_offset<class_Particles2D_set_emissor_offset>` **(** :ref:`Vector2<class_vector2>` offset **)** |
  83. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  84. | void | :ref:`set_emit_timeout<class_Particles2D_set_emit_timeout>` **(** :ref:`float<class_float>` value **)** |
  85. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  86. | void | :ref:`set_emitting<class_Particles2D_set_emitting>` **(** :ref:`bool<class_bool>` active **)** |
  87. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  88. | void | :ref:`set_explosiveness<class_Particles2D_set_explosiveness>` **(** :ref:`float<class_float>` amount **)** |
  89. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  90. | void | :ref:`set_flip_h<class_Particles2D_set_flip_h>` **(** :ref:`bool<class_bool>` enable **)** |
  91. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  92. | void | :ref:`set_flip_v<class_Particles2D_set_flip_v>` **(** :ref:`bool<class_bool>` enable **)** |
  93. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  94. | :ref:`Gradient<class_gradient>` | :ref:`set_gradient<class_Particles2D_set_gradient>` **(** :ref:`Object<class_object>` gradient **)** |
  95. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  96. | void | :ref:`set_h_frames<class_Particles2D_set_h_frames>` **(** :ref:`int<class_int>` enable **)** |
  97. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  98. | void | :ref:`set_initial_velocity<class_Particles2D_set_initial_velocity>` **(** :ref:`Vector2<class_vector2>` velocity **)** |
  99. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  100. | void | :ref:`set_lifetime<class_Particles2D_set_lifetime>` **(** :ref:`float<class_float>` lifetime **)** |
  101. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  102. | void | :ref:`set_param<class_Particles2D_set_param>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
  103. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  104. | void | :ref:`set_pre_process_time<class_Particles2D_set_pre_process_time>` **(** :ref:`float<class_float>` time **)** |
  105. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  106. | void | :ref:`set_process_mode<class_Particles2D_set_process_mode>` **(** :ref:`int<class_int>` mode **)** |
  107. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  108. | void | :ref:`set_randomness<class_Particles2D_set_randomness>` **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)** |
  109. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  110. | :ref:`Texture<class_texture>` | :ref:`set_texture<class_Particles2D_set_texture>` **(** :ref:`Object<class_object>` texture **)** |
  111. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  112. | void | :ref:`set_time_scale<class_Particles2D_set_time_scale>` **(** :ref:`float<class_float>` time_scale **)** |
  113. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  114. | void | :ref:`set_use_local_space<class_Particles2D_set_use_local_space>` **(** :ref:`bool<class_bool>` enable **)** |
  115. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  116. | void | :ref:`set_v_frames<class_Particles2D_set_v_frames>` **(** :ref:`int<class_int>` enable **)** |
  117. +--------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+
  118. Signals
  119. -------
  120. - **emission_finished** **(** **)**
  121. Member Variables
  122. ----------------
  123. - :ref:`Color<class_color>` **color/color**
  124. - :ref:`Gradient<class_gradient>` **color/color_ramp**
  125. - :ref:`int<class_int>` **color_phases/count**
  126. - :ref:`int<class_int>` **config/amount**
  127. - :ref:`float<class_float>` **config/emit_timeout**
  128. - :ref:`bool<class_bool>` **config/emitting**
  129. - :ref:`float<class_float>` **config/explosiveness**
  130. - :ref:`bool<class_bool>` **config/flip_h**
  131. - :ref:`bool<class_bool>` **config/flip_v**
  132. - :ref:`int<class_int>` **config/h_frames**
  133. - :ref:`Vector2<class_vector2>` **config/half_extents**
  134. - :ref:`float<class_float>` **config/lifetime**
  135. - :ref:`bool<class_bool>` **config/local_space**
  136. - :ref:`Vector2<class_vector2>` **config/offset**
  137. - :ref:`float<class_float>` **config/preprocess**
  138. - :ref:`int<class_int>` **config/process_mode**
  139. - :ref:`Texture<class_texture>` **config/texture**
  140. - :ref:`float<class_float>` **config/time_scale**
  141. - :ref:`int<class_int>` **config/v_frames**
  142. - :ref:`PoolVector2Array<class_poolvector2array>` **emission_points**
  143. - :ref:`float<class_float>` **params/anim_initial_pos**
  144. - :ref:`float<class_float>` **params/anim_speed_scale**
  145. - :ref:`float<class_float>` **params/damping**
  146. - :ref:`float<class_float>` **params/direction**
  147. - :ref:`float<class_float>` **params/final_size**
  148. - :ref:`float<class_float>` **params/gravity_direction**
  149. - :ref:`float<class_float>` **params/gravity_strength**
  150. - :ref:`float<class_float>` **params/hue_variation**
  151. - :ref:`float<class_float>` **params/initial_angle**
  152. - :ref:`float<class_float>` **params/initial_size**
  153. - :ref:`float<class_float>` **params/linear_velocity**
  154. - :ref:`float<class_float>` **params/orbit_velocity**
  155. - :ref:`float<class_float>` **params/radial_accel**
  156. - :ref:`float<class_float>` **params/spin_velocity**
  157. - :ref:`float<class_float>` **params/spread**
  158. - :ref:`float<class_float>` **params/tangential_accel**
  159. - :ref:`Color<class_color>` **phase_0/color**
  160. - :ref:`float<class_float>` **phase_0/pos**
  161. - :ref:`Color<class_color>` **phase_1/color**
  162. - :ref:`float<class_float>` **phase_1/pos**
  163. - :ref:`Color<class_color>` **phase_2/color**
  164. - :ref:`float<class_float>` **phase_2/pos**
  165. - :ref:`Color<class_color>` **phase_3/color**
  166. - :ref:`float<class_float>` **phase_3/pos**
  167. - :ref:`float<class_float>` **randomness/anim_initial_pos**
  168. - :ref:`float<class_float>` **randomness/anim_speed_scale**
  169. - :ref:`float<class_float>` **randomness/damping**
  170. - :ref:`float<class_float>` **randomness/direction**
  171. - :ref:`float<class_float>` **randomness/final_size**
  172. - :ref:`float<class_float>` **randomness/gravity_direction**
  173. - :ref:`float<class_float>` **randomness/gravity_strength**
  174. - :ref:`float<class_float>` **randomness/hue_variation**
  175. - :ref:`float<class_float>` **randomness/initial_angle**
  176. - :ref:`float<class_float>` **randomness/initial_size**
  177. - :ref:`float<class_float>` **randomness/linear_velocity**
  178. - :ref:`float<class_float>` **randomness/orbit_velocity**
  179. - :ref:`float<class_float>` **randomness/radial_accel**
  180. - :ref:`float<class_float>` **randomness/spin_velocity**
  181. - :ref:`float<class_float>` **randomness/spread**
  182. - :ref:`float<class_float>` **randomness/tangential_accel**
  183. Numeric Constants
  184. -----------------
  185. - **PARAM_DIRECTION** = **0** --- Direction in degrees at which the particles will be launched, Notice that when the direction is set to 0 the particles will be launched to the negative
  186. - **PARAM_SPREAD** = **1**
  187. - **PARAM_LINEAR_VELOCITY** = **2** --- Velocity at which the particles will be launched.
  188. - **PARAM_SPIN_VELOCITY** = **3** --- The speed at which particles will spin around its own center.
  189. - **PARAM_ORBIT_VELOCITY** = **4** --- Velocity at which the particles will orbit around the emitter center
  190. - **PARAM_GRAVITY_DIRECTION** = **5** --- Direction in degrees at which the particles will be attracted
  191. - **PARAM_GRAVITY_STRENGTH** = **6** --- Strength of the gravitation attraction for each particle
  192. - **PARAM_RADIAL_ACCEL** = **7**
  193. - **PARAM_TANGENTIAL_ACCEL** = **8**
  194. - **PARAM_DAMPING** = **9** --- Amount of damping for each particle
  195. - **PARAM_INITIAL_ANGLE** = **10** --- Initial angle in radians at which each particle will be spawned
  196. - **PARAM_INITIAL_SIZE** = **11** --- Initial size of each particle
  197. - **PARAM_FINAL_SIZE** = **12** --- Final size of each particle, the particle size will interpolate to this value during its lifetime.
  198. - **PARAM_HUE_VARIATION** = **13**
  199. - **PARAM_ANIM_SPEED_SCALE** = **14**
  200. - **PARAM_ANIM_INITIAL_POS** = **15**
  201. - **PARAM_MAX** = **16**
  202. - **MAX_COLOR_PHASES** = **4**
  203. Description
  204. -----------
  205. Particles2D is a particle system 2D :ref:`Node<class_node>` that is used to simulate several types of particle effects, such as explosions, rain, snow, fireflies, or other magical-like shinny sparkles. Particles are drawn using impostors, and given their dynamic behavior, the user must provide a visibility bounding box (although helpers to create one automatically exist).
  206. Member Function Description
  207. ---------------------------
  208. .. _class_Particles2D_get_amount:
  209. - :ref:`int<class_int>` **get_amount** **(** **)** const
  210. Returns the amount of particles spawned at each emission
  211. .. _class_Particles2D_get_color:
  212. - :ref:`Color<class_color>` **get_color** **(** **)** const
  213. Returns the tint color for each particle.
  214. .. _class_Particles2D_get_color_phase_color:
  215. - :ref:`Color<class_color>` **get_color_phase_color** **(** :ref:`int<class_int>` phase **)** const
  216. .. _class_Particles2D_get_color_phase_pos:
  217. - :ref:`float<class_float>` **get_color_phase_pos** **(** :ref:`int<class_int>` phase **)** const
  218. .. _class_Particles2D_get_color_phases:
  219. - :ref:`int<class_int>` **get_color_phases** **(** **)** const
  220. .. _class_Particles2D_get_emission_half_extents:
  221. - :ref:`Vector2<class_vector2>` **get_emission_half_extents** **(** **)** const
  222. Returns the half extents of the emission box.
  223. .. _class_Particles2D_get_emission_points:
  224. - :ref:`PoolVector2Array<class_poolvector2array>` **get_emission_points** **(** **)** const
  225. .. _class_Particles2D_get_emissor_offset:
  226. - :ref:`Vector2<class_vector2>` **get_emissor_offset** **(** **)** const
  227. Returns the particle spawn origin position relative to the emitter.
  228. .. _class_Particles2D_get_emit_timeout:
  229. - :ref:`float<class_float>` **get_emit_timeout** **(** **)** const
  230. Returns the amount of seconds during which the emitter will spawn particles
  231. .. _class_Particles2D_get_explosiveness:
  232. - :ref:`float<class_float>` **get_explosiveness** **(** **)** const
  233. .. _class_Particles2D_get_gradient:
  234. - :ref:`Gradient<class_gradient>` **get_gradient** **(** **)** const
  235. Returns the :ref:`Gradient<class_gradient>` used to tint each particle.
  236. .. _class_Particles2D_get_h_frames:
  237. - :ref:`int<class_int>` **get_h_frames** **(** **)** const
  238. .. _class_Particles2D_get_initial_velocity:
  239. - :ref:`Vector2<class_vector2>` **get_initial_velocity** **(** **)** const
  240. .. _class_Particles2D_get_lifetime:
  241. - :ref:`float<class_float>` **get_lifetime** **(** **)** const
  242. Gets the amount of seconds that each particle will be visible.
  243. .. _class_Particles2D_get_param:
  244. - :ref:`float<class_float>` **get_param** **(** :ref:`int<class_int>` param **)** const
  245. Returns the value of the specified emitter parameter
  246. .. _class_Particles2D_get_pre_process_time:
  247. - :ref:`float<class_float>` **get_pre_process_time** **(** **)** const
  248. .. _class_Particles2D_get_process_mode:
  249. - :ref:`int<class_int>` **get_process_mode** **(** **)** const
  250. .. _class_Particles2D_get_randomness:
  251. - :ref:`float<class_float>` **get_randomness** **(** :ref:`int<class_int>` param **)** const
  252. Returns the randomness value of the specified emitter parameter
  253. .. _class_Particles2D_get_texture:
  254. - :ref:`Texture<class_texture>` **get_texture** **(** **)** const
  255. Returns the texture for emitted particles
  256. .. _class_Particles2D_get_time_scale:
  257. - :ref:`float<class_float>` **get_time_scale** **(** **)** const
  258. Returns the emitter time scale
  259. .. _class_Particles2D_get_v_frames:
  260. - :ref:`int<class_int>` **get_v_frames** **(** **)** const
  261. .. _class_Particles2D_is_emitting:
  262. - :ref:`bool<class_bool>` **is_emitting** **(** **)** const
  263. Returns whether this emitter is currently emitting or not
  264. .. _class_Particles2D_is_flipped_h:
  265. - :ref:`bool<class_bool>` **is_flipped_h** **(** **)** const
  266. .. _class_Particles2D_is_flipped_v:
  267. - :ref:`bool<class_bool>` **is_flipped_v** **(** **)** const
  268. .. _class_Particles2D_is_using_local_space:
  269. - :ref:`bool<class_bool>` **is_using_local_space** **(** **)** const
  270. .. _class_Particles2D_pre_process:
  271. - void **pre_process** **(** :ref:`float<class_float>` time **)**
  272. .. _class_Particles2D_reset:
  273. - void **reset** **(** **)**
  274. .. _class_Particles2D_set_amount:
  275. - void **set_amount** **(** :ref:`int<class_int>` amount **)**
  276. Sets the amount of particles spawned at each emission
  277. .. _class_Particles2D_set_color:
  278. - void **set_color** **(** :ref:`Color<class_color>` color **)**
  279. Set the tint color for each particle.
  280. .. _class_Particles2D_set_color_phase_color:
  281. - void **set_color_phase_color** **(** :ref:`int<class_int>` phase, :ref:`Color<class_color>` color **)**
  282. .. _class_Particles2D_set_color_phase_pos:
  283. - void **set_color_phase_pos** **(** :ref:`int<class_int>` phase, :ref:`float<class_float>` pos **)**
  284. .. _class_Particles2D_set_color_phases:
  285. - void **set_color_phases** **(** :ref:`int<class_int>` phases **)**
  286. .. _class_Particles2D_set_emission_half_extents:
  287. - void **set_emission_half_extents** **(** :ref:`Vector2<class_vector2>` extents **)**
  288. Sets the half extents of the emission box, particles will be spawned at random inside this box.
  289. .. _class_Particles2D_set_emission_points:
  290. - void **set_emission_points** **(** :ref:`PoolVector2Array<class_poolvector2array>` points **)**
  291. .. _class_Particles2D_set_emissor_offset:
  292. - void **set_emissor_offset** **(** :ref:`Vector2<class_vector2>` offset **)**
  293. Sets the particle spawn origin position relative to the emitter center. for example if this value is set to (50, 50), the particle will spawn 50 units to the right and 50 units to the bottom of the emitter center.
  294. .. _class_Particles2D_set_emit_timeout:
  295. - void **set_emit_timeout** **(** :ref:`float<class_float>` value **)**
  296. Sets the amount of seconds during which the emitter will spawn particles, after the specified seconds the emitter state will be set to non emitting, so calling :ref:`is_emitting<class_Particles2D_is_emitting>` will return false. If the timeout is 0 the emitter will spawn forever.
  297. .. _class_Particles2D_set_emitting:
  298. - void **set_emitting** **(** :ref:`bool<class_bool>` active **)**
  299. If this is set to true then the particle emitter will emit particles, if its false it will not.
  300. .. _class_Particles2D_set_explosiveness:
  301. - void **set_explosiveness** **(** :ref:`float<class_float>` amount **)**
  302. .. _class_Particles2D_set_flip_h:
  303. - void **set_flip_h** **(** :ref:`bool<class_bool>` enable **)**
  304. .. _class_Particles2D_set_flip_v:
  305. - void **set_flip_v** **(** :ref:`bool<class_bool>` enable **)**
  306. .. _class_Particles2D_set_gradient:
  307. - :ref:`Gradient<class_gradient>` **set_gradient** **(** :ref:`Object<class_object>` gradient **)**
  308. Sets the :ref:`Gradient<class_gradient>` used to tint each particle. Particle will be tinted according to their lifetimes.
  309. .. _class_Particles2D_set_h_frames:
  310. - void **set_h_frames** **(** :ref:`int<class_int>` enable **)**
  311. .. _class_Particles2D_set_initial_velocity:
  312. - void **set_initial_velocity** **(** :ref:`Vector2<class_vector2>` velocity **)**
  313. .. _class_Particles2D_set_lifetime:
  314. - void **set_lifetime** **(** :ref:`float<class_float>` lifetime **)**
  315. Sets the amount of seconds that each particle will be visible.
  316. .. _class_Particles2D_set_param:
  317. - void **set_param** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
  318. Sets the value of the specified emitter parameter (see the constants secction for the list of parameters)
  319. .. _class_Particles2D_set_pre_process_time:
  320. - void **set_pre_process_time** **(** :ref:`float<class_float>` time **)**
  321. .. _class_Particles2D_set_process_mode:
  322. - void **set_process_mode** **(** :ref:`int<class_int>` mode **)**
  323. .. _class_Particles2D_set_randomness:
  324. - void **set_randomness** **(** :ref:`int<class_int>` param, :ref:`float<class_float>` value **)**
  325. Sets the randomness value of the specified emitter parameter (see the constants secction for the list of parameters), 0 means no randomness, so every particle will have the parameters specified, 1 means that the parameter will be chosen at random, the closer the randomness value gets to 0 the more conservative the variation of the parameter will be.
  326. .. _class_Particles2D_set_texture:
  327. - :ref:`Texture<class_texture>` **set_texture** **(** :ref:`Object<class_object>` texture **)**
  328. Sets the texture for each particle
  329. .. _class_Particles2D_set_time_scale:
  330. - void **set_time_scale** **(** :ref:`float<class_float>` time_scale **)**
  331. Sets the increment or decrement for the particle lifetime. for example: if the time scale is set to 2, the particles will die and move twice as fast.
  332. .. _class_Particles2D_set_use_local_space:
  333. - void **set_use_local_space** **(** :ref:`bool<class_bool>` enable **)**
  334. .. _class_Particles2D_set_v_frames:
  335. - void **set_v_frames** **(** :ref:`int<class_int>` enable **)**