sonolus.script.particle¶
Particle
¶
Bases: Record
A particle effect.
is_available()
¶
Check if the particle effect is available.
spawn(quad, duration, loop=False)
¶
Spawn the particle effect.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
quad
|
QuadLike
|
The quad to spawn the particle effect on. |
required |
duration
|
float
|
The duration of the particle effect. |
required |
loop
|
bool
|
Whether to loop the particle effect. |
False
|
Returns:
Name | Type | Description |
---|---|---|
ParticleHandle |
ParticleHandle
|
A handle to the spawned particle effect. |
ParticleHandle
¶
StandardParticle
¶
Standard particles.
particle(name)
¶
Define a particle with the given name.
particles(cls)
¶
Decorator to define particles.
Usage
@particles
class Particles:
tap: StandardParticle.NOTE_CIRCULAR_TAP_RED
other: Particle = particle("other")