A script to simulate snow particles ❄️.
Name | Type | Default |
---|---|---|
emitting | bool |
false |
amount | int |
200 |
visibility_rect | Rect2 |
Rect2(0.0, -100.0, 320.0, 180.0) |
colors | PoolColorArray |
[Color(1.0, 1.0, 1.0, 1.0)] |
min_velocity | float |
10.0 |
max_velocity | float |
50.0 |
timer_wait_time | float |
5.0 |
preprocess | bool |
false |
export (bool) var emitting = false setget _set_emitting
If true
, particles are being emitted.
Name | Type | Default | Setter |
---|---|---|---|
emitting |
bool |
false |
_set_emitting |
export (int) var amount = 200 setget _set_amount
The number of particles.
Name | Type | Default | Setter |
---|---|---|---|
amount |
int |
200 |
_set_amount |
export (Rect2) var visibility_rect = Rect2(0.0, -100.0, 320.0, 180.0) setget _set_visibility_rect
Controls the visibility of the particles.
Name | Type | Default | Setter |
---|---|---|---|
visibility_rect |
Rect2 |
Rect2(0.0, -100.0, 320.0, 180.0) |
_set_visibility_rect |
export (PoolColorArray) var colors = [Color(1.0, 1.0, 1.0, 1.0)] setget _set_colors
The color/s of the particles.
If there is more than 1 color, these colors will be applied randomly \ on the "background" particles along with the main color.
Name | Type | Default | Setter |
---|---|---|---|
colors |
PoolColorArray |
[Color(1.0, 1.0, 1.0, 1.0)] |
_set_colors |
export (float) var min_velocity = 10.0 setget _set_min_velocity
The possible minimum velocity of the particles.
Name | Type | Default | Setter |
---|---|---|---|
min_velocity |
float |
10.0 |
_set_min_velocity |
export (float) var max_velocity = 50.0 setget _set_max_velocity
The possible maximum velocity of the particles.
Name | Type | Default | Setter |
---|---|---|---|
max_velocity |
float |
50.0 |
_set_max_velocity |
export (float) var timer_wait_time = 5.0 setget _set_timer_wait_time
The amount of time (in seconds) until the next cycle of particles is emitted.
Name | Type | Default | Setter |
---|---|---|---|
timer_wait_time |
float |
5.0 |
_set_timer_wait_time |
export (bool) var preprocess = false
If true
, visibility_rect will be full of particles when loading the scene.
Name | Type | Default |
---|---|---|
preprocess |
bool |
false |
See CHANGELOG.
- hiulit
Feel free to:
- Open an issue if you find a bug.
- Create a pull request if you have a new cool feature to add to the project.
If you find this project helpful, please consider supporting it through any size donations to help make it better.
If you can't, consider sharing it with the world...
... or giving it a star.
Thank you very much!
- Source code: MIT License.
- Documentation (GDScriptify): MIT License.
Powered by GDScriptify.