Skip to content

rossunger/Godot-3-2D-Fake-Confetti-Particles

Β 
Β 

Repository files navigation

Godot 3 2D Fake Confetti Particles

Godot v3.x release v1.1.0 MIT license

A script to simulate confetti particles πŸŽ‰.

Godot 3 2D Fake Confetti Particles banner

Table of contents

Variables

Name Type Default
emitting bool false
type int 0
amount int 150
random_amount bool true
size float 3.0
random_size bool true
visibility_rect Rect2 Rect2(0.0, 0.0, 1024.0, 600.0)
colors Array [Color("#008751"),Color("#00e436"),Color("#29adff"),Color("#7e2553"),Color("#83769c"),Color("#ff004d"),Color("#ff77a8"),Color("#ffa300"),Color("#ffec27")]
random_position bool true
one_shot bool false
fade bool true
timer_wait_time float 1.0

Variables

emitting

export (bool) var emitting = false setget _set_emitting

If true, particles are being emitted.

Name Type Default Setter
emitting bool false _set_emitting

type

export (int, "Square", "Circle") var type = 0

The type of particles:

  • 0 (Square).
  • 1 (Circle).
Name Type Default
type int 0

amount

export (int) var amount = 150

The number of particles.

Name Type Default
amount int 150

random_amount

export (bool) var random_amount = true

If true, the number of particles can be a random number between amount / 2 and amount * 2.

If false, the number of particles will be the exact number in amount.

Name Type Default
random_amount bool true

size

export (float) var size = 3.0

The size of the particles.

If the particles are squares, size is the length of their sides. If the particles are circles, size is their radius.

Name Type Default
size float 3.0

random_size

export (bool) var random_size = true

If true, the size of the particles can be a random number between size / 2 and size * 2.

If false, the size of the particles will be the exact number in size.

Name Type Default
random_size bool true

visibility_rect

export (Rect2) var visibility_rect = Rect2(0.0, 0.0, 1024.0, 600.0)

Controls the visibility of the particles.

Name Type Default
visibility_rect Rect2 Rect2(0.0, 0.0, 1024.0, 600.0)

colors

export (Array) var colors = [Color("#008751"),Color("#00e436"),Color("#29adff"),Color("#7e2553"),Color("#83769c"),Color("#ff004d"),Color("#ff77a8"),Color("#ffa300"),Color("#ffec27")]

The color/s of the particles.

Name Type Default
colors Array [Color("#008751"),Color("#00e436"),Color("#29adff"),Color("#7e2553"),Color("#83769c"),Color("#ff004d"),Color("#ff77a8"),Color("#ffa300"),Color("#ffec27")]

random_position

export (bool) var random_position = true

If true, the initial position of the particles can be a random position in visibility_rect.

If false, the initial position of the particles will be Vector(0, 0).

Name Type Default
random_position bool true

one_shot

export (bool) var one_shot = false

If true, only one emission cycle occurs.

Name Type Default
one_shot bool false

fade

export (bool) var fade = true

If true, the particles will gradually fade.

If false, the particles will end abruptly.

Name Type Default
fade bool true

timer_wait_time

export (float) var timer_wait_time = 1.0

The duration (in seconds) of the emission cycle.

Name Type Default
timer_wait_time float 1.0

πŸ—’οΈ Changelog

See CHANGELOG.

πŸ‘€ Author

  • hiulit

🀝 Contributing

Feel free to:

πŸ™Œ Supporting this project

If you find this project helpful, please consider supporting it through any size donations to help make it better.

Become a patron

Suppor me on Ko-Fi

Donate Paypal

If you can't, consider sharing it with the world...

Share on Twitter

... or giving it a star.

Thank you very much!

πŸ“ Licenses


Powered by GDScriptify.

About

A script to simulate confetti particles πŸŽ‰

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • GDScript 100.0%