浏览代码

Particle System Animation End

Added animation end callback support
MackeyK24 8 年之前
父节点
当前提交
dcb300cf27
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/Particles/babylon.particleSystem.ts

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

@@ -73,6 +73,7 @@
         }
 
         public updateFunction: (particles: Particle[]) => void;
+        public onAnimationEnd: () => void = null;
 
         public blendMode = ParticleSystem.BLENDMODE_ONEONE;
 
@@ -390,6 +391,11 @@
             }
 
             this._vertexBuffer.update(this._vertexData);
+
+            // Animation End
+            if (this.onAnimationEnd != null) {
+                this.onAnimationEnd();
+            }
         }
 
         public render(): number {