class_particles2d.rst 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the Particles2D.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_Particles2D:
  5. Particles2D
  6. ===========
  7. **Inherits:** :ref:`Node2D<class_node2d>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. 2D particle emitter.
  12. Member Functions
  13. ----------------
  14. +----------------------------+-----------------------------------------------------------------------+
  15. | :ref:`Rect2<class_rect2>` | :ref:`capture_rect<class_Particles2D_capture_rect>` **(** **)** const |
  16. +----------------------------+-----------------------------------------------------------------------+
  17. | void | :ref:`restart<class_Particles2D_restart>` **(** **)** |
  18. +----------------------------+-----------------------------------------------------------------------+
  19. Member Variables
  20. ----------------
  21. .. _class_Particles2D_amount:
  22. - :ref:`int<class_int>` **amount** - Number of particles emitted in one emission cycle.
  23. .. _class_Particles2D_draw_order:
  24. - :ref:`DrawOrder<enum_particles2d_draworder>` **draw_order** - Particle draw order. Uses ``DRAW_ORDER_*`` values. Default value: ``DRAW_ORDER_INDEX``.
  25. .. _class_Particles2D_emitting:
  26. - :ref:`bool<class_bool>` **emitting** - If ``true`` particles are being emitted. Default value: ``true``.
  27. .. _class_Particles2D_explosiveness:
  28. - :ref:`float<class_float>` **explosiveness** - How rapidly particles in an emission cycle are emitted. If greater than ``0``, there will be a gap in emissions before the next cycle begins. Default value: ``0``.
  29. .. _class_Particles2D_fixed_fps:
  30. - :ref:`int<class_int>` **fixed_fps**
  31. .. _class_Particles2D_fract_delta:
  32. - :ref:`bool<class_bool>` **fract_delta**
  33. .. _class_Particles2D_h_frames:
  34. - :ref:`int<class_int>` **h_frames** - Number of horizontal frames in ``texture``.
  35. .. _class_Particles2D_lifetime:
  36. - :ref:`float<class_float>` **lifetime** - Amount of time each particle will exist. Default value: ``1``.
  37. .. _class_Particles2D_local_coords:
  38. - :ref:`bool<class_bool>` **local_coords** - If ``true`` particles use the parent node's coordinate space. If ``false`` they use global coordinates. Default value: ``true``.
  39. .. _class_Particles2D_normal_map:
  40. - :ref:`Texture<class_texture>` **normal_map**
  41. .. _class_Particles2D_one_shot:
  42. - :ref:`bool<class_bool>` **one_shot** - If ``true`` only one emission cycle occurs. If set ``true`` during a cycle, emission will stop at the cycle's end. Default value: ``false``.
  43. .. _class_Particles2D_preprocess:
  44. - :ref:`float<class_float>` **preprocess** - Particle system starts as if it had already run for this many seconds.
  45. .. _class_Particles2D_process_material:
  46. - :ref:`Material<class_material>` **process_material** - :ref:`Material<class_material>` for processing particles. Can be a :ref:`ParticlesMaterial<class_particlesmaterial>` or a :ref:`ShaderMaterial<class_shadermaterial>`.
  47. .. _class_Particles2D_randomness:
  48. - :ref:`float<class_float>` **randomness** - Emission lifetime randomness ratio. Default value: ``0``.
  49. .. _class_Particles2D_speed_scale:
  50. - :ref:`float<class_float>` **speed_scale** - Particle system's running speed scaling ratio. Default value: ``1``.
  51. .. _class_Particles2D_texture:
  52. - :ref:`Texture<class_texture>` **texture** - Particle texture. If ``null`` particles will be squares.
  53. .. _class_Particles2D_v_frames:
  54. - :ref:`int<class_int>` **v_frames** - Number of vertical frames in ``texture``.
  55. .. _class_Particles2D_visibility_rect:
  56. - :ref:`Rect2<class_rect2>` **visibility_rect** - Editor visibility helper.
  57. Enums
  58. -----
  59. .. _enum_Particles2D_DrawOrder:
  60. enum **DrawOrder**
  61. - **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted.
  62. - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime.
  63. Description
  64. -----------
  65. 2D particle node used to create a variety of particle systems and effects. ``Particles2D`` features an emitter that generates some number of particles at a given rate.
  66. Use the ``process_material`` property to add a :ref:`ParticlesMaterial<class_particlesmaterial>` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial<class_shadermaterial>` which will be applied to all particles.
  67. Member Function Description
  68. ---------------------------
  69. .. _class_Particles2D_capture_rect:
  70. - :ref:`Rect2<class_rect2>` **capture_rect** **(** **)** const
  71. .. _class_Particles2D_restart:
  72. - void **restart** **(** **)**