IsStopped() static private method

static private IsStopped ( ParticleSystem root ) : bool
root UnityEngine.ParticleSystem
return bool
示例#1
0
        public void ApplyProperties()
        {
            bool hasModifiedProperties = this.m_ParticleSystemSerializedObject.hasModifiedProperties;

            if (this.m_ParticleSystemSerializedObject.targetObject != null)
            {
                this.m_ParticleSystemSerializedObject.ApplyModifiedProperties();
            }
            if (hasModifiedProperties)
            {
                ParticleSystem[] particleSystems = this.m_ParticleSystems;
                for (int i = 0; i < particleSystems.Length; i++)
                {
                    ParticleSystem ps   = particleSystems[i];
                    ParticleSystem root = ParticleSystemEditorUtils.GetRoot(ps);
                    if (!ParticleEffectUI.IsStopped(root) && ParticleSystemEditorUtils.editorResimulation)
                    {
                        ParticleSystemEditorUtils.PerformCompleteResimulation();
                    }
                }
                this.UpdateParticleSystemInfoString();
            }
            if (this.m_RendererSerializedObject != null && this.m_RendererSerializedObject.targetObject != null)
            {
                this.m_RendererSerializedObject.ApplyModifiedProperties();
            }
        }
        public void ApplyProperties()
        {
            bool hasModifiedProperties = m_ParticleSystemSerializedObject.hasModifiedProperties;

            // Check the system was not destroyed such as by an Undo operation.
            if (m_ParticleSystemSerializedObject.targetObject != null)
            {
                m_ParticleSystemSerializedObject.ApplyModifiedProperties();
            }
            if (hasModifiedProperties)
            {
                // Resimulate
                foreach (ParticleSystem ps in m_ParticleSystems)
                {
                    ParticleSystem root = ParticleSystemEditorUtils.GetRoot(ps);
                    if (!ParticleEffectUI.IsStopped(root) && ParticleSystemEditorUtils.resimulation)
                    {
                        ParticleSystemEditorUtils.PerformCompleteResimulation();
                    }
                }

                // Refresh procedural supported string
                UpdateParticleSystemInfoString();
            }
            if (m_RendererSerializedObject != null && m_RendererSerializedObject.targetObject != null)
            {
                m_RendererSerializedObject.ApplyModifiedProperties();
            }
        }
 internal bool IsPaused()
 {
     if (!this.IsPlaying())
     {
         return(!ParticleEffectUI.IsStopped(this.GetRoot()));
     }
     return(false);
 }
示例#4
0
        public void ApplyProperties()
        {
            bool hasModifiedProperties = this.m_ParticleSystemSerializedObject.hasModifiedProperties;

            this.m_ParticleSystemSerializedObject.ApplyModifiedProperties();
            if (hasModifiedProperties)
            {
                if (!ParticleEffectUI.IsStopped(ParticleSystemEditorUtils.GetRoot(this.m_ParticleSystem)) && ParticleSystemEditorUtils.editorResimulation)
                {
                    ParticleSystemEditorUtils.PerformCompleteResimulation();
                }
                this.UpdateParticleSystemInfoString();
            }
            if (this.m_RendererSerializedObject != null)
            {
                this.m_RendererSerializedObject.ApplyModifiedProperties();
            }
        }
示例#5
0
 internal bool IsPaused()
 {
     return(!this.IsPlaying() && !ParticleEffectUI.IsStopped(ParticleSystemEditorUtils.GetRoot(this.m_SelectedParticleSystems[0])));
 }