protected override void Init()
		{
			if (InitialModuleUI.s_Texts == null)
			{
				InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
			}
			if (this.m_LengthInSec != null)
			{
				return;
			}
			this.m_LengthInSec = base.GetProperty0("lengthInSec");
			this.m_Looping = base.GetProperty0("looping");
			this.m_Prewarm = base.GetProperty0("prewarm");
			this.m_StartDelay = base.GetProperty0("startDelay");
			this.m_PlayOnAwake = base.GetProperty0("playOnAwake");
			this.m_SimulationSpace = base.GetProperty0("moveWithTransform");
			this.m_LifeTime = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.lifetime, "startLifetime");
			this.m_Speed = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.speed, "startSpeed", ModuleUI.kUseSignedRange);
			this.m_Color = new SerializedMinMaxGradient(this, "startColor");
			this.m_Size = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.size, "startSize");
			this.m_Rotation = new SerializedMinMaxCurve(this, InitialModuleUI.s_Texts.rotation, "startRotation", ModuleUI.kUseSignedRange);
			this.m_Rotation.m_RemapValue = 57.29578f;
			this.m_Rotation.m_DefaultCurveScalar = 3.14159274f;
			this.m_GravityModifier = base.GetProperty("gravityModifier");
			this.m_InheritVelocity = base.GetProperty("inheritVelocity");
			this.m_MaxNumParticles = base.GetProperty("maxNumParticles");
		}
 public override void OnInspectorGUI(ParticleSystem s)
 {
   if (InitialModuleUI.s_Texts == null)
     InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
   double num1 = (double) ModuleUI.GUIFloat(InitialModuleUI.s_Texts.duration, this.m_LengthInSec, "f2");
   this.m_LengthInSec.floatValue = Mathf.Min(100000f, Mathf.Max(0.0f, this.m_LengthInSec.floatValue));
   bool boolValue1 = this.m_Looping.boolValue;
   ModuleUI.GUIToggle(InitialModuleUI.s_Texts.looping, this.m_Looping);
   if (this.m_Looping.boolValue && !boolValue1 && (double) s.time >= (double) this.m_LengthInSec.floatValue)
     s.time = 0.0f;
   EditorGUI.BeginDisabledGroup(!this.m_Looping.boolValue);
   ModuleUI.GUIToggle(InitialModuleUI.s_Texts.prewarm, this.m_Prewarm);
   EditorGUI.EndDisabledGroup();
   EditorGUI.BeginDisabledGroup(this.m_Prewarm.boolValue && this.m_Looping.boolValue);
   ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.startDelay, this.m_StartDelay);
   EditorGUI.EndDisabledGroup();
   ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.lifetime, this.m_LifeTime);
   ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.speed, this.m_Speed);
   ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.size, this.m_Size);
   EditorGUI.BeginChangeCheck();
   bool flag = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.rotation3D, this.m_Rotation3D);
   if (EditorGUI.EndChangeCheck())
   {
     if (flag)
     {
       this.m_RotationZ.RemoveCurveFromEditor();
     }
     else
     {
       this.m_RotationX.RemoveCurveFromEditor();
       this.m_RotationY.RemoveCurveFromEditor();
       this.m_RotationZ.RemoveCurveFromEditor();
     }
   }
   if (flag)
   {
     this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.z;
     this.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_RotationX, InitialModuleUI.s_Texts.y, this.m_RotationY, InitialModuleUI.s_Texts.z, this.m_RotationZ, (SerializedProperty) null);
   }
   else
   {
     this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.rotation;
     ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.rotation, this.m_RotationZ);
   }
   double num2 = (double) ModuleUI.GUIFloat(InitialModuleUI.s_Texts.randomizeRotationDirection, this.m_RandomizeRotationDirection);
   this.GUIMinMaxGradient(InitialModuleUI.s_Texts.color, this.m_Color);
   double num3 = (double) ModuleUI.GUIFloat(InitialModuleUI.s_Texts.gravity, this.m_GravityModifier);
   ModuleUI.GUIBoolAsPopup(InitialModuleUI.s_Texts.simulationSpace, this.m_SimulationSpace, InitialModuleUI.s_Texts.simulationSpaces);
   ModuleUI.GUIPopup(InitialModuleUI.s_Texts.scalingMode, this.m_ScalingMode, new string[3]
   {
     "Hierarchy",
     "Local",
     "Shape"
   });
   bool boolValue2 = this.m_PlayOnAwake.boolValue;
   bool newPlayOnAwake = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoplay, this.m_PlayOnAwake);
   if (boolValue2 != newPlayOnAwake)
     this.m_ParticleSystemUI.m_ParticleEffectUI.PlayOnAwakeChanged(newPlayOnAwake);
   ModuleUI.GUIInt(InitialModuleUI.s_Texts.maxParticles, this.m_MaxNumParticles);
 }
 protected override void Init()
 {
   if (InitialModuleUI.s_Texts == null)
     InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
   if (this.m_LengthInSec != null)
     return;
   this.m_LengthInSec = this.GetProperty0("lengthInSec");
   this.m_Looping = this.GetProperty0("looping");
   this.m_Prewarm = this.GetProperty0("prewarm");
   this.m_StartDelay = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.startDelay, "startDelay", false, true);
   this.m_StartDelay.m_AllowCurves = false;
   this.m_PlayOnAwake = this.GetProperty0("playOnAwake");
   this.m_SimulationSpace = this.GetProperty0("moveWithTransform");
   this.m_ScalingMode = this.GetProperty0("scalingMode");
   this.m_LifeTime = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.lifetime, "startLifetime");
   this.m_Speed = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.speed, "startSpeed", ModuleUI.kUseSignedRange);
   this.m_Color = new SerializedMinMaxGradient((SerializedModule) this, "startColor");
   this.m_Size = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.size, "startSize");
   this.m_Rotation3D = this.GetProperty("rotation3D");
   this.m_RotationX = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.x, "startRotationX", ModuleUI.kUseSignedRange);
   this.m_RotationY = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.y, "startRotationY", ModuleUI.kUseSignedRange);
   this.m_RotationZ = new SerializedMinMaxCurve((ModuleUI) this, InitialModuleUI.s_Texts.z, "startRotation", ModuleUI.kUseSignedRange);
   this.m_RotationX.m_RemapValue = 57.29578f;
   this.m_RotationY.m_RemapValue = 57.29578f;
   this.m_RotationZ.m_RemapValue = 57.29578f;
   this.m_RotationX.m_DefaultCurveScalar = 3.141593f;
   this.m_RotationY.m_DefaultCurveScalar = 3.141593f;
   this.m_RotationZ.m_DefaultCurveScalar = 3.141593f;
   this.m_RandomizeRotationDirection = this.GetProperty("randomizeRotationDirection");
   this.m_GravityModifier = this.GetProperty("gravityModifier");
   this.m_MaxNumParticles = this.GetProperty("maxNumParticles");
 }
		public override void OnInspectorGUI(ParticleSystem s)
		{
			if (InitialModuleUI.s_Texts == null)
			{
				InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
			}
			ModuleUI.GUIFloat(InitialModuleUI.s_Texts.duration, this.m_LengthInSec, "f2");
			this.m_LengthInSec.floatValue = Mathf.Min(100000f, Mathf.Max(0f, this.m_LengthInSec.floatValue));
			bool boolValue = this.m_Looping.boolValue;
			ModuleUI.GUIToggle(InitialModuleUI.s_Texts.looping, this.m_Looping);
			if (this.m_Looping.boolValue && !boolValue && s.time >= this.m_LengthInSec.floatValue)
			{
				s.time = 0f;
			}
			EditorGUI.BeginDisabledGroup(!this.m_Looping.boolValue);
			ModuleUI.GUIToggle(InitialModuleUI.s_Texts.prewarm, this.m_Prewarm);
			EditorGUI.EndDisabledGroup();
			EditorGUI.BeginDisabledGroup(this.m_Prewarm.boolValue && this.m_Looping.boolValue);
			ModuleUI.GUIFloat(InitialModuleUI.s_Texts.startDelay, this.m_StartDelay);
			EditorGUI.EndDisabledGroup();
			ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.lifetime, this.m_LifeTime);
			ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.speed, this.m_Speed);
			ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.size, this.m_Size);
			ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.rotation, this.m_Rotation);
			base.GUIMinMaxGradient(InitialModuleUI.s_Texts.color, this.m_Color);
			ModuleUI.GUIFloat(InitialModuleUI.s_Texts.gravity, this.m_GravityModifier);
			ModuleUI.GUIFloat(InitialModuleUI.s_Texts.inheritvelocity, this.m_InheritVelocity);
			ModuleUI.GUIBoolAsPopup(InitialModuleUI.s_Texts.simulationSpace, this.m_SimulationSpace, InitialModuleUI.s_Texts.simulationSpaces);
			bool boolValue2 = this.m_PlayOnAwake.boolValue;
			bool flag = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoplay, this.m_PlayOnAwake);
			if (boolValue2 != flag)
			{
				this.m_ParticleSystemUI.m_ParticleEffectUI.PlayOnAwakeChanged(flag);
			}
			ModuleUI.GUIInt(InitialModuleUI.s_Texts.maxParticles, this.m_MaxNumParticles);
		}
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (InitialModuleUI.s_Texts == null)
            {
                InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
            }
            double num1 = (double)ModuleUI.GUIFloat(InitialModuleUI.s_Texts.duration, this.m_LengthInSec, "f2");

            this.m_LengthInSec.floatValue = Mathf.Min(100000f, Mathf.Max(0.0f, this.m_LengthInSec.floatValue));
            bool boolValue1 = this.m_Looping.boolValue;

            ModuleUI.GUIToggle(InitialModuleUI.s_Texts.looping, this.m_Looping);
            if (this.m_Looping.boolValue && !boolValue1 && (double)s.time >= (double)this.m_LengthInSec.floatValue)
            {
                s.time = 0.0f;
            }
            EditorGUI.BeginDisabledGroup(!this.m_Looping.boolValue);
            ModuleUI.GUIToggle(InitialModuleUI.s_Texts.prewarm, this.m_Prewarm);
            EditorGUI.EndDisabledGroup();
            EditorGUI.BeginDisabledGroup(this.m_Prewarm.boolValue && this.m_Looping.boolValue);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.startDelay, this.m_StartDelay);
            EditorGUI.EndDisabledGroup();
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.lifetime, this.m_LifeTime);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.speed, this.m_Speed);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.size, this.m_Size);
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.rotation3D, this.m_Rotation3D);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag)
                {
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_RotationX.RemoveCurveFromEditor();
                    this.m_RotationY.RemoveCurveFromEditor();
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
            }
            if (flag)
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.z;
                this.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_RotationX, InitialModuleUI.s_Texts.y, this.m_RotationY, InitialModuleUI.s_Texts.z, this.m_RotationZ, (SerializedProperty)null);
            }
            else
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.rotation;
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.rotation, this.m_RotationZ);
            }
            double num2 = (double)ModuleUI.GUIFloat(InitialModuleUI.s_Texts.randomizeRotationDirection, this.m_RandomizeRotationDirection);

            this.GUIMinMaxGradient(InitialModuleUI.s_Texts.color, this.m_Color);
            double num3 = (double)ModuleUI.GUIFloat(InitialModuleUI.s_Texts.gravity, this.m_GravityModifier);

            ModuleUI.GUIBoolAsPopup(InitialModuleUI.s_Texts.simulationSpace, this.m_SimulationSpace, InitialModuleUI.s_Texts.simulationSpaces);
            ModuleUI.GUIPopup(InitialModuleUI.s_Texts.scalingMode, this.m_ScalingMode, new string[3]
            {
                "Hierarchy",
                "Local",
                "Shape"
            });
            bool boolValue2     = this.m_PlayOnAwake.boolValue;
            bool newPlayOnAwake = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoplay, this.m_PlayOnAwake);

            if (boolValue2 != newPlayOnAwake)
            {
                this.m_ParticleSystemUI.m_ParticleEffectUI.PlayOnAwakeChanged(newPlayOnAwake);
            }
            ModuleUI.GUIInt(InitialModuleUI.s_Texts.maxParticles, this.m_MaxNumParticles);
        }
Example #6
0
        public override void OnInspectorGUI(InitialModuleUI initial)
        {
            if (InitialModuleUI.s_Texts == null)
            {
                InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.duration, this.m_LengthInSec, "f2", new GUILayoutOption[0]);
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.looping, this.m_Looping, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck() && flag)
            {
                ParticleSystem[] particleSystems = this.m_ParticleSystemUI.m_ParticleSystems;
                for (int i = 0; i < particleSystems.Length; i++)
                {
                    ParticleSystem particleSystem = particleSystems[i];
                    if (particleSystem.time >= particleSystem.main.duration)
                    {
                        particleSystem.time = 0f;
                    }
                }
            }
            using (new EditorGUI.DisabledScope(!this.m_Looping.boolValue))
            {
                ModuleUI.GUIToggle(InitialModuleUI.s_Texts.prewarm, this.m_Prewarm, new GUILayoutOption[0]);
            }
            using (new EditorGUI.DisabledScope(this.m_Prewarm.boolValue && this.m_Looping.boolValue))
            {
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.startDelay, this.m_StartDelay, new GUILayoutOption[0]);
            }
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.lifetime, this.m_LifeTime, new GUILayoutOption[0]);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.speed, this.m_Speed, new GUILayoutOption[0]);
            EditorGUI.BeginChangeCheck();
            bool flag2 = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.size3D, this.m_Size3D, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag2)
                {
                    this.m_SizeX.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_SizeX.RemoveCurveFromEditor();
                    this.m_SizeY.RemoveCurveFromEditor();
                    this.m_SizeZ.RemoveCurveFromEditor();
                }
            }
            if (!this.m_SizeX.stateHasMultipleDifferentValues)
            {
                this.m_SizeZ.SetMinMaxState(this.m_SizeX.state, flag2);
                this.m_SizeY.SetMinMaxState(this.m_SizeX.state, flag2);
            }
            if (flag2)
            {
                this.m_SizeX.m_DisplayName = InitialModuleUI.s_Texts.x;
                base.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_SizeX, InitialModuleUI.s_Texts.y, this.m_SizeY, InitialModuleUI.s_Texts.z, this.m_SizeZ, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_SizeX.m_DisplayName = InitialModuleUI.s_Texts.size;
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.size, this.m_SizeX, new GUILayoutOption[0]);
            }
            EditorGUI.BeginChangeCheck();
            bool flag3 = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.rotation3D, this.m_Rotation3D, new GUILayoutOption[0]);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag3)
                {
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_RotationX.RemoveCurveFromEditor();
                    this.m_RotationY.RemoveCurveFromEditor();
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
            }
            if (!this.m_RotationZ.stateHasMultipleDifferentValues)
            {
                this.m_RotationX.SetMinMaxState(this.m_RotationZ.state, flag3);
                this.m_RotationY.SetMinMaxState(this.m_RotationZ.state, flag3);
            }
            if (flag3)
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.z;
                base.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_RotationX, InitialModuleUI.s_Texts.y, this.m_RotationY, InitialModuleUI.s_Texts.z, this.m_RotationZ, null, new GUILayoutOption[0]);
            }
            else
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.rotation;
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.rotation, this.m_RotationZ, new GUILayoutOption[0]);
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.randomizeRotationDirection, this.m_RandomizeRotationDirection, new GUILayoutOption[0]);
            base.GUIMinMaxGradient(InitialModuleUI.s_Texts.color, this.m_Color, false, new GUILayoutOption[0]);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.gravity, this.m_GravityModifier, new GUILayoutOption[0]);
            int num = ModuleUI.GUIPopup(InitialModuleUI.s_Texts.simulationSpace, this.m_SimulationSpace, new string[]
            {
                "Local",
                "World",
                "Custom"
            }, new GUILayoutOption[0]);

            if (num == 2 && this.m_CustomSimulationSpace != null)
            {
                ModuleUI.GUIObject(InitialModuleUI.s_Texts.customSimulationSpace, this.m_CustomSimulationSpace, new GUILayoutOption[0]);
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.simulationSpeed, this.m_SimulationSpeed, new GUILayoutOption[0]);
            ModuleUI.GUIBoolAsPopup(InitialModuleUI.s_Texts.deltaTime, this.m_UseUnscaledTime, new string[]
            {
                "Scaled",
                "Unscaled"
            }, new GUILayoutOption[0]);
            bool flag4 = this.m_ParticleSystemUI.m_ParticleSystems.FirstOrDefault((ParticleSystem o) => o.shape.shapeType != ParticleSystemShapeType.SkinnedMeshRenderer && o.shape.shapeType != ParticleSystemShapeType.MeshRenderer) != null;

            if (flag4)
            {
                ModuleUI.GUIPopup(InitialModuleUI.s_Texts.scalingMode, this.m_ScalingMode, new string[]
                {
                    "Hierarchy",
                    "Local",
                    "Shape"
                }, new GUILayoutOption[0]);
            }
            bool boolValue = this.m_PlayOnAwake.boolValue;
            bool flag5     = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoplay, this.m_PlayOnAwake, new GUILayoutOption[0]);

            if (boolValue != flag5)
            {
                this.m_ParticleSystemUI.m_ParticleEffectUI.PlayOnAwakeChanged(flag5);
            }
            ModuleUI.GUIBoolAsPopup(InitialModuleUI.s_Texts.emitterVelocity, this.m_EmitterVelocity, new string[]
            {
                "Transform",
                "Rigidbody"
            }, new GUILayoutOption[0]);
            ModuleUI.GUIInt(InitialModuleUI.s_Texts.maxParticles, this.m_MaxNumParticles, new GUILayoutOption[0]);
            if (!ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoRandomSeed, this.m_AutoRandomSeed, new GUILayoutOption[0]))
            {
                bool flag6 = this.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner is ParticleSystemInspector;
                if (flag6)
                {
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    ModuleUI.GUIInt(InitialModuleUI.s_Texts.randomSeed, this.m_RandomSeed, new GUILayoutOption[0]);
                    if (!this.m_ParticleSystemUI.multiEdit && GUILayout.Button("Reseed", EditorStyles.miniButton, new GUILayoutOption[]
                    {
                        GUILayout.Width(60f)
                    }))
                    {
                        this.m_RandomSeed.intValue = this.m_ParticleSystemUI.m_ParticleSystems[0].GenerateRandomSeed();
                    }
                    GUILayout.EndHorizontal();
                }
                else
                {
                    ModuleUI.GUIInt(InitialModuleUI.s_Texts.randomSeed, this.m_RandomSeed, new GUILayoutOption[0]);
                    if (!this.m_ParticleSystemUI.multiEdit && GUILayout.Button("Reseed", EditorStyles.miniButton, new GUILayoutOption[0]))
                    {
                        this.m_RandomSeed.intValue = this.m_ParticleSystemUI.m_ParticleSystems[0].GenerateRandomSeed();
                    }
                }
            }
        }
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (InitialModuleUI.s_Texts == null)
            {
                InitialModuleUI.s_Texts = new InitialModuleUI.Texts();
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.duration, this.m_LengthInSec, "f2");
            this.m_LengthInSec.floatValue = Mathf.Min(100000f, Mathf.Max(0f, this.m_LengthInSec.floatValue));
            bool boolValue = this.m_Looping.boolValue;

            ModuleUI.GUIToggle(InitialModuleUI.s_Texts.looping, this.m_Looping);
            if (this.m_Looping.boolValue && !boolValue && s.time >= this.m_LengthInSec.floatValue)
            {
                s.time = 0f;
            }
            using (new EditorGUI.DisabledScope(!this.m_Looping.boolValue))
            {
                ModuleUI.GUIToggle(InitialModuleUI.s_Texts.prewarm, this.m_Prewarm);
            }
            using (new EditorGUI.DisabledScope(this.m_Prewarm.boolValue && this.m_Looping.boolValue))
            {
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.startDelay, this.m_StartDelay);
            }
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.lifetime, this.m_LifeTime);
            ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.speed, this.m_Speed);
            EditorGUI.BeginChangeCheck();
            bool flag = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.size3D, this.m_Size3D);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag)
                {
                    this.m_SizeX.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_SizeX.RemoveCurveFromEditor();
                    this.m_SizeY.RemoveCurveFromEditor();
                    this.m_SizeZ.RemoveCurveFromEditor();
                }
            }
            if (flag)
            {
                this.m_SizeX.m_DisplayName = InitialModuleUI.s_Texts.x;
                base.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_SizeX, InitialModuleUI.s_Texts.y, this.m_SizeY, InitialModuleUI.s_Texts.z, this.m_SizeZ, null);
            }
            else
            {
                this.m_SizeX.m_DisplayName = InitialModuleUI.s_Texts.size;
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.size, this.m_SizeX);
            }
            EditorGUI.BeginChangeCheck();
            bool flag2 = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.rotation3D, this.m_Rotation3D);

            if (EditorGUI.EndChangeCheck())
            {
                if (flag2)
                {
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
                else
                {
                    this.m_RotationX.RemoveCurveFromEditor();
                    this.m_RotationY.RemoveCurveFromEditor();
                    this.m_RotationZ.RemoveCurveFromEditor();
                }
            }
            if (flag2)
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.z;
                base.GUITripleMinMaxCurve(GUIContent.none, InitialModuleUI.s_Texts.x, this.m_RotationX, InitialModuleUI.s_Texts.y, this.m_RotationY, InitialModuleUI.s_Texts.z, this.m_RotationZ, null);
            }
            else
            {
                this.m_RotationZ.m_DisplayName = InitialModuleUI.s_Texts.rotation;
                ModuleUI.GUIMinMaxCurve(InitialModuleUI.s_Texts.rotation, this.m_RotationZ);
            }
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.randomizeRotationDirection, this.m_RandomizeRotationDirection);
            base.GUIMinMaxGradient(InitialModuleUI.s_Texts.color, this.m_Color);
            ModuleUI.GUIFloat(InitialModuleUI.s_Texts.gravity, this.m_GravityModifier);
            ModuleUI.GUIBoolAsPopup(InitialModuleUI.s_Texts.simulationSpace, this.m_SimulationSpace, InitialModuleUI.s_Texts.simulationSpaces);
            ModuleUI.GUIPopup(InitialModuleUI.s_Texts.scalingMode, this.m_ScalingMode, new string[]
            {
                "Hierarchy",
                "Local",
                "Shape"
            });
            bool boolValue2 = this.m_PlayOnAwake.boolValue;
            bool flag3      = ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoplay, this.m_PlayOnAwake);

            if (boolValue2 != flag3)
            {
                this.m_ParticleSystemUI.m_ParticleEffectUI.PlayOnAwakeChanged(flag3);
            }
            ModuleUI.GUIInt(InitialModuleUI.s_Texts.maxParticles, this.m_MaxNumParticles);
            if (!ModuleUI.GUIToggle(InitialModuleUI.s_Texts.autoRandomSeed, this.m_AutoRandomSeed))
            {
                bool flag4 = this.m_ParticleSystemUI.m_ParticleEffectUI.m_Owner is ParticleSystemInspector;
                if (flag4)
                {
                    GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                    ModuleUI.GUIInt(InitialModuleUI.s_Texts.randomSeed, this.m_RandomSeed);
                    if (GUILayout.Button("Reseed", EditorStyles.miniButton, new GUILayoutOption[]
                    {
                        GUILayout.Width(60f)
                    }))
                    {
                        this.m_RandomSeed.intValue = this.m_ParticleSystemUI.m_ParticleSystem.GenerateRandomSeed();
                    }
                    GUILayout.EndHorizontal();
                }
                else
                {
                    ModuleUI.GUIInt(InitialModuleUI.s_Texts.randomSeed, this.m_RandomSeed);
                    if (GUILayout.Button("Reseed", EditorStyles.miniButton, new GUILayoutOption[0]))
                    {
                        this.m_RandomSeed.intValue = this.m_ParticleSystemUI.m_ParticleSystem.GenerateRandomSeed();
                    }
                }
            }
        }