![]() |
Pixelpart 1.8.4
Godot Plugin
|
A node that plays a Pixelpart effect. More...
Public Member Functions | |
| void | set_effect (Ref< PixelpartEffectResource > resource) |
| Change the effect resource that is shown. | |
| Ref< PixelpartEffectResource > | get_effect () const |
| Return the effect resource that is being shown. | |
| void | play (bool state) |
| Start playing or pause simulation of the effect. | |
| void | pause () |
| Pause simulation of the effect. | |
| void | restart () |
| Restart the effect and remove all existing particles. | |
| void | reset () |
| Restart the effect, but do not remove existing particles. | |
| bool | is_playing () const |
| Return whether the effect is currently playing or is paused. | |
| float | get_time () const |
| Return the time in seconds since the effect has started playing. | |
| void | set_loop (bool mode) |
Set whether the effect restarts automatically after time loop_time. | |
| bool | get_loop () const |
Return whether the effect restarts automatically after time loop_time. | |
| void | set_loop_time (float time) |
| Set time in seconds after which the effect loops. | |
| float | get_loop_time () const |
| Return time in seconds after which the effect loops. | |
| void | set_warmup_time (float time) |
| Set time in seconds the effect is pre-simulated before being rendered. | |
| float | get_warmup_time () const |
| Return time in seconds the effect is pre-simulated before being rendered. | |
| void | set_speed (float sp) |
| Set how fast the effect is being played. | |
| float | get_speed () const |
| Return how fast the effect is being played. | |
| void | set_frame_rate (float rate) |
| Set at which rate the effect is simulated, in frames per second. | |
| float | get_frame_rate () const |
| Return at which rate the effect is simulated, in frames per second. | |
| void | set_seed (int sd) |
| Set the seed used to initialize the effect simulation. | |
| int | get_seed () const |
| Return the seed used to initialize the effect simulation. | |
| void | enable_random_seed (bool mode) |
| Use a random seed to initialize the effect simulation. | |
| bool | is_random_seed_enabled () const |
| Return whether a random seed is used to initialize the effect simulation. | |
| void | set_effect_scale (float scale) |
| Set multiplier for the size of the effect. | |
| float | get_effect_scale () const |
| Return multiplier for the size of the effect. | |
| void | set_inputs (Dictionary inputs) |
| Set dictionary of effect input values. | |
| Dictionary | get_inputs () const |
| Return dictionary of effect input values. | |
| void | set_input_bool (String name, bool value) |
| void | set_input_int (String name, int value) |
| void | set_input_float (String name, float value) |
| void | set_input_float2 (String name, Vector2 value) |
| void | set_input_float3 (String name, Vector3 value) |
| void | set_input_float4 (String name, Vector4 value) |
| bool | get_input_bool (String name) const |
Return value of an effect input. The effect input must be of type bool. | |
| int | get_input_int (String name) const |
Return value of an effect input. The effect input must be of type int. | |
| float | get_input_float (String name) const |
Return value of an effect input. The effect input must be of type float. | |
| Vector2 | get_input_float2 (String name) const |
Return value of an effect input. The effect input must be of type Vector2. | |
| Vector3 | get_input_float3 (String name) const |
Return value of an effect input. The effect input must be of type Vector3. | |
| Vector4 | get_input_float4 (String name) const |
Return value of an effect input. The effect input must be of type Vector4. | |
| int | get_input_type (String name) const |
Return the type of an effect input or -1 if the effect input does not exist. | |
| TypedArray< String > | get_input_names () const |
| Return names of available effect inputs. | |
| void | activate_trigger (String name) |
Activate trigger name. | |
| bool | is_trigger_activated (String name) const |
Return whether trigger name was activated. | |
| void | spawn_particles (String particleEmitterName, String particleTypeName, int count) |
Generate count particles of the given type from the given emitter. | |
| Ref< PixelpartNode > | find_node (String name) const |
| Return the node with the given name. | |
| Ref< PixelpartNode > | get_node (int id) const |
| Return the node with the given ID. | |
| Ref< PixelpartNode > | get_node_at_index (int index) const |
| Return the node at the given index. | |
| Ref< PixelpartParticleType > | find_particle_type (String name) const |
| Return the particle type with the given name. | |
| Ref< PixelpartParticleType > | get_particle_type (int id) const |
| Return the particle type with the given ID. | |
| Ref< PixelpartParticleType > | get_particle_type_at_index (int index) const |
| Return the particle type at the given index. | |
| Ref< PixelpartParticleEmitter > | find_particle_emitter (String name) const |
| Return the particle emitter with the given name. | |
| Ref< PixelpartForceField > | find_force_field (String name) const |
| Return the force field with the given name. | |
| Ref< PixelpartCollider > | find_collider (String name) const |
| Return the collider with the given name. | |
| Ref< PixelpartParticleEmitter > | get_particle_emitter (int id) const |
| Return the particle emitter with the given ID. | |
| Ref< PixelpartForceField > | get_force_field (int id) const |
| Return the force field with the given ID. | |
| Ref< PixelpartCollider > | get_collider (int id) const |
| Return the collider with the given ID. | |
| Ref< PixelpartParticleEmitter > | get_particle_emitter_at_index (int index) const |
| Return the particle emitter at the given index. | |
| Ref< PixelpartForceField > | get_force_field_at_index (int index) const |
| Return the force field at the given index. | |
| Ref< PixelpartCollider > | get_collider_at_index (int index) const |
| Return the collider at the given index. | |
Public Attributes | |
| PixelpartEffectResource | effect |
| Effect resource that is shown. | |
| bool | playing |
| Whether the effect is currently playing or not. | |
| bool | loop |
Whether the effect restarts automatically after time loop_time. | |
| float | loop_time |
| Time in seconds after which the effect loops. | |
| float | warmup_time |
| Time in seconds the effect is pre-simulated before being rendered. | |
| float | speed |
| How fast the effect is being played. | |
| float | frame_rate |
| At which rate the effect is simulated, in frames per second. | |
| int | seed |
| Seed used to initialize the effect simulation. | |
| bool | random_seed |
| Whether to use a random seed to initialize the effect simulation. | |
| Dictionary | inputs |
| Dictionary of effect input values. | |
| float | effect_scale |
| Multiplier for the size of the effect. | |
A node that plays a Pixelpart effect.
This class offers methods and properties to change how the effect is simulated and rendered.
| void godot::PixelpartEffect::activate_trigger | ( | String | name | ) |
Activate trigger name.
| name | Name of the trigger |
| void godot::PixelpartEffect::enable_random_seed | ( | bool | mode | ) |
Use a random seed to initialize the effect simulation.
| mode | Whether to use a random simulation seed |
| Ref< PixelpartCollider > godot::PixelpartEffect::find_collider | ( | String | name | ) | const |
Return the collider with the given name.
find_node instead.| name | Node name |
null if no node with this name exists | Ref< PixelpartForceField > godot::PixelpartEffect::find_force_field | ( | String | name | ) | const |
Return the force field with the given name.
find_node instead.| name | Node name |
null if no node with this name exists | Ref< PixelpartNode > godot::PixelpartEffect::find_node | ( | String | name | ) | const |
Return the node with the given name.
| name | Node name |
null if no node with this name exists | Ref< PixelpartParticleEmitter > godot::PixelpartEffect::find_particle_emitter | ( | String | name | ) | const |
Return the particle emitter with the given name.
find_node instead.| name | Node name |
null if no node with this name exists | Ref< PixelpartParticleType > godot::PixelpartEffect::find_particle_type | ( | String | name | ) | const |
Return the particle type with the given name.
| name | Particle type name |
null if no particle type with this name exists | Ref< PixelpartCollider > godot::PixelpartEffect::get_collider | ( | int | id | ) | const |
Return the collider with the given ID.
get_node instead.| id | Node ID |
null if no node with this ID exists | Ref< PixelpartCollider > godot::PixelpartEffect::get_collider_at_index | ( | int | index | ) | const |
Return the collider at the given index.
get_node_at_index instead.| index | Node index |
null if no node at this index exists | Ref< PixelpartEffectResource > godot::PixelpartEffect::get_effect | ( | ) | const |
Return the effect resource that is being shown.
| float godot::PixelpartEffect::get_effect_scale | ( | ) | const |
Return multiplier for the size of the effect.
| Ref< PixelpartForceField > godot::PixelpartEffect::get_force_field | ( | int | id | ) | const |
Return the force field with the given ID.
get_node instead.| id | Node ID |
null if no node with this ID exists | Ref< PixelpartForceField > godot::PixelpartEffect::get_force_field_at_index | ( | int | index | ) | const |
Return the force field at the given index.
get_node_at_index instead.| index | Node index |
null if no node at this index exists | float godot::PixelpartEffect::get_frame_rate | ( | ) | const |
Return at which rate the effect is simulated, in frames per second.
| bool godot::PixelpartEffect::get_input_bool | ( | String | name | ) | const |
Return value of an effect input. The effect input must be of type bool.
| name | Name of the effect input |
| float godot::PixelpartEffect::get_input_float | ( | String | name | ) | const |
Return value of an effect input. The effect input must be of type float.
| name | Name of the effect input |
| Vector2 godot::PixelpartEffect::get_input_float2 | ( | String | name | ) | const |
Return value of an effect input. The effect input must be of type Vector2.
| name | Name of the effect input |
| Vector3 godot::PixelpartEffect::get_input_float3 | ( | String | name | ) | const |
Return value of an effect input. The effect input must be of type Vector3.
| name | Name of the effect input |
| Vector4 godot::PixelpartEffect::get_input_float4 | ( | String | name | ) | const |
Return value of an effect input. The effect input must be of type Vector4.
| name | Name of the effect input |
| int godot::PixelpartEffect::get_input_int | ( | String | name | ) | const |
Return value of an effect input. The effect input must be of type int.
| name | Name of the effect input |
| TypedArray< String > godot::PixelpartEffect::get_input_names | ( | ) | const |
Return names of available effect inputs.
| int godot::PixelpartEffect::get_input_type | ( | String | name | ) | const |
Return the type of an effect input or -1 if the effect input does not exist.
| name | Name of the effect input |
| Dictionary godot::PixelpartEffect::get_inputs | ( | ) | const |
Return dictionary of effect input values.
Do not use to change effect inputs at runtime, use the set_input methods instead.
| bool godot::PixelpartEffect::get_loop | ( | ) | const |
Return whether the effect restarts automatically after time loop_time.
| float godot::PixelpartEffect::get_loop_time | ( | ) | const |
Return time in seconds after which the effect loops.
| Ref< PixelpartNode > godot::PixelpartEffect::get_node | ( | int | id | ) | const |
Return the node with the given ID.
| id | Node ID |
null if no node with this ID exists | Ref< PixelpartNode > godot::PixelpartEffect::get_node_at_index | ( | int | index | ) | const |
Return the node at the given index.
| index | Node index, starting from 0 |
null if no node at this index exists | Ref< PixelpartParticleEmitter > godot::PixelpartEffect::get_particle_emitter | ( | int | id | ) | const |
Return the particle emitter with the given ID.
get_node instead.| id | Node ID |
null if no node with this ID exists | Ref< PixelpartParticleEmitter > godot::PixelpartEffect::get_particle_emitter_at_index | ( | int | index | ) | const |
Return the particle emitter at the given index.
get_node_at_index instead.| index | Node index |
null if no node at this index exists | Ref< PixelpartParticleType > godot::PixelpartEffect::get_particle_type | ( | int | id | ) | const |
Return the particle type with the given ID.
| id | Particle type ID |
null if no particle type with this ID exists | Ref< PixelpartParticleType > godot::PixelpartEffect::get_particle_type_at_index | ( | int | index | ) | const |
Return the particle type at the given index.
| index | Particle type index |
null if no particle type at this index exists | int godot::PixelpartEffect::get_seed | ( | ) | const |
Return the seed used to initialize the effect simulation.
| float godot::PixelpartEffect::get_speed | ( | ) | const |
Return how fast the effect is being played.
| float godot::PixelpartEffect::get_time | ( | ) | const |
Return the time in seconds since the effect has started playing.
| float godot::PixelpartEffect::get_warmup_time | ( | ) | const |
Return time in seconds the effect is pre-simulated before being rendered.
| bool godot::PixelpartEffect::is_playing | ( | ) | const |
Return whether the effect is currently playing or is paused.
| bool godot::PixelpartEffect::is_random_seed_enabled | ( | ) | const |
Return whether a random seed is used to initialize the effect simulation.
| bool godot::PixelpartEffect::is_trigger_activated | ( | String | name | ) | const |
Return whether trigger name was activated.
| name | Name of the trigger |
true if the trigger was activated | void godot::PixelpartEffect::pause | ( | ) |
Pause simulation of the effect.
If paused, the effect is still rendered but freezed in time.
| void godot::PixelpartEffect::play | ( | bool | state | ) |
Start playing or pause simulation of the effect.
If paused, the effect is still rendered but freezed in time.
| state | Whether to play or pause the effect. |
| void godot::PixelpartEffect::set_effect | ( | Ref< PixelpartEffectResource > | resource | ) |
Change the effect resource that is shown.
| resource | Effect resource to show |
| void godot::PixelpartEffect::set_effect_scale | ( | float | scale | ) |
Set multiplier for the size of the effect.
Adjust this value if the effect appears too small or too large in the scene.
| scale | Effect scale |
| void godot::PixelpartEffect::set_frame_rate | ( | float | rate | ) |
Set at which rate the effect is simulated, in frames per second.
| rate | Frame rate, in frames per second |
| void godot::PixelpartEffect::set_input_bool | ( | String | name, |
| bool | value ) |
Set the effect input name to the given value. The effect input must be of type bool.
| name | Name of the effect input |
| value | New value |
| void godot::PixelpartEffect::set_input_float | ( | String | name, |
| float | value ) |
Set the effect input name to the given value. The effect input must be of type float.
| name | Name of the effect input |
| value | New value |
| void godot::PixelpartEffect::set_input_float2 | ( | String | name, |
| Vector2 | value ) |
Set the effect input name to the given value. The effect input must be of type Vector2.
| name | Name of the effect input |
| value | New value |
| void godot::PixelpartEffect::set_input_float3 | ( | String | name, |
| Vector3 | value ) |
Set the effect input name to the given value. The effect input must be of type Vector3.
| name | Name of the effect input |
| value | New value |
| void godot::PixelpartEffect::set_input_float4 | ( | String | name, |
| Vector4 | value ) |
Set the effect input name to the given value. The effect input must be of type Vector4.
| name | Name of the effect input |
| value | New value |
| void godot::PixelpartEffect::set_input_int | ( | String | name, |
| int | value ) |
Set the effect input name to the given value. The effect input must be of type int.
| name | Name of the effect input |
| value | New value |
| void godot::PixelpartEffect::set_inputs | ( | Dictionary | inputs | ) |
Set dictionary of effect input values.
Do not use to change effect inputs at runtime, use the set_input methods instead.
| inputs | Effect input values |
| void godot::PixelpartEffect::set_loop | ( | bool | mode | ) |
Set whether the effect restarts automatically after time loop_time.
| mode | Loop mode |
| void godot::PixelpartEffect::set_loop_time | ( | float | time | ) |
Set time in seconds after which the effect loops.
Only effective if loop = true.
| time | Loop time in seconds |
| void godot::PixelpartEffect::set_seed | ( | int | sd | ) |
Set the seed used to initialize the effect simulation.
This seed is used if random_seed is not enabled.
| sd | Seed value |
| void godot::PixelpartEffect::set_speed | ( | float | sp | ) |
Set how fast the effect is being played.
| sp | Speed multiplier |
| void godot::PixelpartEffect::set_warmup_time | ( | float | time | ) |
Set time in seconds the effect is pre-simulated before being rendered.
This value impacts performance and should be kept as low as possible.
| time | Warmup time in seconds |
| void godot::PixelpartEffect::spawn_particles | ( | String | particleEmitterName, |
| String | particleTypeName, | ||
| int | count ) |
Generate count particles of the given type from the given emitter.
| particleEmitterName | Name of the particle emitter |
| particleTypeName | Name of the particle type |
| count | Number of particles to generate |
| float godot::PixelpartEffect::effect_scale |
Multiplier for the size of the effect.
Adjust this value if the effect appears too small or too large in the scene.
| Dictionary godot::PixelpartEffect::inputs |
Dictionary of effect input values.
Do not use to change effect inputs at runtime, use the set_input methods instead.
| float godot::PixelpartEffect::loop_time |
Time in seconds after which the effect loops.
Only effective if loop = true.
| int godot::PixelpartEffect::seed |
Seed used to initialize the effect simulation.
This seed is used if random_seed is not enabled.
| float godot::PixelpartEffect::warmup_time |
Time in seconds the effect is pre-simulated before being rendered.
This value impacts performance and should be kept as low as possible.