Parcourir la source

Add a customEffect property

Popov72 il y a 5 ans
Parent
commit
76dd0c6e32
1 fichiers modifiés avec 11 ajouts et 0 suppressions
  1. 11 0
      src/Particles/particleSystem.ts

+ 11 - 0
src/Particles/particleSystem.ts

@@ -214,6 +214,17 @@ export class ParticleSystem extends BaseParticleSystem implements IDisposable, I
     }
 
     /**
+     * Gets or sets the custom effect used to render the particles
+     */
+    public get customEffect(): Nullable<Effect> {
+        return this._customEffect;
+    }
+
+    public set customEffect(effect: Nullable<Effect>) {
+        this._customEffect = effect;
+    }
+
+    /**
      * Instantiates a particle system.
      * Particles are often small sprites used to simulate hard-to-reproduce phenomena like fire, smoke, water, or abstract visual effects like magic glitter and faery dust.
      * @param name The name of the particle system