Bläddra i källkod

Merge pull request #2580 from MackeyK24/master

Master
David Catuhe 8 år sedan
förälder
incheckning
eed58b23d1
1 ändrade filer med 4 tillägg och 0 borttagningar
  1. 4 0
      src/Particles/babylon.particleSystem.ts

+ 4 - 0
src/Particles/babylon.particleSystem.ts

@@ -73,6 +73,7 @@
         }
 
         public updateFunction: (particles: Particle[]) => void;
+        public onAnimationEnd: () => void = null;
 
         public blendMode = ParticleSystem.BLENDMODE_ONEONE;
 
@@ -372,6 +373,9 @@
             if (this._stopped) {
                 if (!this._alive) {
                     this._started = false;
+                    if (this.onAnimationEnd) {
+                        this.onAnimationEnd();
+                    }
                     if (this.disposeOnStop) {
                         this._scene._toBeDisposed.push(this);
                     }