.. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the Particles2D.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_Particles2D: Particles2D =========== **Inherits:** :ref:`Node2D` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- 2D particle emitter. Member Functions ---------------- +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`capture_rect` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_amount` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_draw_order` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_explosiveness_ratio` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_fixed_fps` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_fractional_delta` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_h_frames` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_lifetime` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_normal_map` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_one_shot` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_pre_process_time` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`Material` | :ref:`get_process_material` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_randomness_ratio` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_speed_scale` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture` | :ref:`get_texture` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_use_local_coordinates` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_v_frames` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_visibility_rect` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_emitting` **(** **)** const | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`restart` **(** **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_amount` **(** :ref:`int` amount **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_draw_order` **(** :ref:`int` order **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_emitting` **(** :ref:`bool` emitting **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_explosiveness_ratio` **(** :ref:`float` ratio **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_fixed_fps` **(** :ref:`int` fps **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_fractional_delta` **(** :ref:`bool` enable **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_h_frames` **(** :ref:`int` frames **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_lifetime` **(** :ref:`float` secs **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_normal_map` **(** :ref:`Texture` texture **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_one_shot` **(** :ref:`bool` secs **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_pre_process_time` **(** :ref:`float` secs **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_process_material` **(** :ref:`Material` material **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_randomness_ratio` **(** :ref:`float` ratio **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_speed_scale` **(** :ref:`float` scale **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_texture` **(** :ref:`Texture` texture **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_use_local_coordinates` **(** :ref:`bool` enable **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_v_frames` **(** :ref:`int` frames **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_visibility_rect` **(** :ref:`Rect2` aabb **)** | +----------------------------------+----------------------------------------------------------------------------------------------------------------------------+ Member Variables ---------------- - :ref:`int` **amount** - Number of particles to emit. - :ref:`int` **draw_order** - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. Default value: [code]DRAW_ORDER_INDEX[/code]. - :ref:`bool` **emitting** - If [code]true[/code] particles are being emitted. Default value: [code]true[/code]. - :ref:`float` **explosiveness** - Time ratio between each emission. If [code]0[/code] particles are emitted continuously. If [code]1[/code] all particles are emitted simultaneously. Default value: [code]0[/code]. - :ref:`int` **fixed_fps** - :ref:`bool` **fract_delta** - :ref:`int` **h_frames** - Number of horizontal frames in [code]texture[/code]. - :ref:`float` **lifetime** - Amount of time each particle will exist. Default value: [code]1[/code]. - :ref:`bool` **local_coords** - If [code]true[/code] particles use the parent node's coordinate space. If [code]false[/code] they use global coordinates. Default value: [code]true[/code]. - :ref:`Texture` **normal_map** - :ref:`bool` **one_shot** - If [code]true[/code] only [code]amount[/code] particles will be emitted. Default value: [code]false[/code]. - :ref:`float` **preprocess** - :ref:`Material` **process_material** - [Material] for processing particles. Can be a [ParticlesMaterial] or a [ShaderMaterial]. - :ref:`float` **randomness** - Emission randomness ratio. Default value: [code]0[/code]. - :ref:`float` **speed_scale** - Speed scaling ratio. Default value: [code]1[/code]. - :ref:`Texture` **texture** - Particle texture. If [code]null[/code] particles will be squares. - :ref:`int` **v_frames** - Number of vertical frames in [code]texture[/code]. - :ref:`Rect2` **visibility_rect** Numeric Constants ----------------- - **DRAW_ORDER_INDEX** = **0** --- Particles are drawn in the order emitted. - **DRAW_ORDER_LIFETIME** = **1** --- Particles are drawn in order of remaining lifetime. Description ----------- 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. Use the ``process_material`` property to add a :ref:`ParticlesMaterial` to configure particle appearance and behavior. Alternatively, you can add a :ref:`ShaderMaterial` which will be applied to all particles. Member Function Description --------------------------- .. _class_Particles2D_capture_rect: - :ref:`Rect2` **capture_rect** **(** **)** const .. _class_Particles2D_get_amount: - :ref:`int` **get_amount** **(** **)** const Returns the amount of particles spawned at each emission .. _class_Particles2D_get_draw_order: - :ref:`int` **get_draw_order** **(** **)** const .. _class_Particles2D_get_explosiveness_ratio: - :ref:`float` **get_explosiveness_ratio** **(** **)** const .. _class_Particles2D_get_fixed_fps: - :ref:`int` **get_fixed_fps** **(** **)** const .. _class_Particles2D_get_fractional_delta: - :ref:`bool` **get_fractional_delta** **(** **)** const .. _class_Particles2D_get_h_frames: - :ref:`int` **get_h_frames** **(** **)** const .. _class_Particles2D_get_lifetime: - :ref:`float` **get_lifetime** **(** **)** const Gets the amount of seconds that each particle will be visible. .. _class_Particles2D_get_normal_map: - :ref:`Texture` **get_normal_map** **(** **)** const .. _class_Particles2D_get_one_shot: - :ref:`bool` **get_one_shot** **(** **)** const .. _class_Particles2D_get_pre_process_time: - :ref:`float` **get_pre_process_time** **(** **)** const .. _class_Particles2D_get_process_material: - :ref:`Material` **get_process_material** **(** **)** const .. _class_Particles2D_get_randomness_ratio: - :ref:`float` **get_randomness_ratio** **(** **)** const .. _class_Particles2D_get_speed_scale: - :ref:`float` **get_speed_scale** **(** **)** const .. _class_Particles2D_get_texture: - :ref:`Texture` **get_texture** **(** **)** const Returns the texture for emitted particles .. _class_Particles2D_get_use_local_coordinates: - :ref:`bool` **get_use_local_coordinates** **(** **)** const .. _class_Particles2D_get_v_frames: - :ref:`int` **get_v_frames** **(** **)** const .. _class_Particles2D_get_visibility_rect: - :ref:`Rect2` **get_visibility_rect** **(** **)** const .. _class_Particles2D_is_emitting: - :ref:`bool` **is_emitting** **(** **)** const Returns whether this emitter is currently emitting or not .. _class_Particles2D_restart: - void **restart** **(** **)** .. _class_Particles2D_set_amount: - void **set_amount** **(** :ref:`int` amount **)** Sets the amount of particles spawned at each emission .. _class_Particles2D_set_draw_order: - void **set_draw_order** **(** :ref:`int` order **)** .. _class_Particles2D_set_emitting: - void **set_emitting** **(** :ref:`bool` emitting **)** If this is set to true then the particle emitter will emit particles, if its false it will not. .. _class_Particles2D_set_explosiveness_ratio: - void **set_explosiveness_ratio** **(** :ref:`float` ratio **)** .. _class_Particles2D_set_fixed_fps: - void **set_fixed_fps** **(** :ref:`int` fps **)** .. _class_Particles2D_set_fractional_delta: - void **set_fractional_delta** **(** :ref:`bool` enable **)** .. _class_Particles2D_set_h_frames: - void **set_h_frames** **(** :ref:`int` frames **)** .. _class_Particles2D_set_lifetime: - void **set_lifetime** **(** :ref:`float` secs **)** Sets the amount of seconds that each particle will be visible. .. _class_Particles2D_set_normal_map: - void **set_normal_map** **(** :ref:`Texture` texture **)** .. _class_Particles2D_set_one_shot: - void **set_one_shot** **(** :ref:`bool` secs **)** .. _class_Particles2D_set_pre_process_time: - void **set_pre_process_time** **(** :ref:`float` secs **)** .. _class_Particles2D_set_process_material: - void **set_process_material** **(** :ref:`Material` material **)** .. _class_Particles2D_set_randomness_ratio: - void **set_randomness_ratio** **(** :ref:`float` ratio **)** .. _class_Particles2D_set_speed_scale: - void **set_speed_scale** **(** :ref:`float` scale **)** .. _class_Particles2D_set_texture: - void **set_texture** **(** :ref:`Texture` texture **)** .. _class_Particles2D_set_use_local_coordinates: - void **set_use_local_coordinates** **(** :ref:`bool` enable **)** .. _class_Particles2D_set_v_frames: - void **set_v_frames** **(** :ref:`int` frames **)** .. _class_Particles2D_set_visibility_rect: - void **set_visibility_rect** **(** :ref:`Rect2` aabb **)**