浏览代码

PreventAutoStart in particle system

Raanan Weber 9 年之前
父节点
当前提交
daf838c251
共有 1 个文件被更改,包括 4 次插入3 次删除
  1. 4 3
      src/Particles/babylon.particleSystem.ts

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

@@ -465,7 +465,7 @@
             if (this.particleTexture) {
                 serializationObject.textureName = this.particleTexture.name;
             }
-            
+
             // Animations
             Animation.AppendSerializedAnimations(this, serializationObject);
 
@@ -550,8 +550,9 @@
             particleSystem.targetStopDuration = parsedParticleSystem.targetStopDuration;
             particleSystem.textureMask = Color4.FromArray(parsedParticleSystem.textureMask);
             particleSystem.blendMode = parsedParticleSystem.blendMode;
-            particleSystem.start();
-
+            if (!parsedParticleSystem.preventAutoStart) {
+                particleSystem.start();
+            }
             return particleSystem;
         }
     }