소스 검색

Merge pull request #1092 from RaananW/preventAutoStart

PreventAutoStart in particle system
David Catuhe 9 년 전
부모
커밋
12de471770
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;
         }
     }