Esempio n. 1
0
        public bool IsParticleSystemUIVisible(ParticleSystemUI psUI)
        {
            ParticleEffectUI.OwnerType ownerType = (!(this.m_Owner is ParticleSystemInspector)) ? ParticleEffectUI.OwnerType.ParticleSystemWindow : ParticleEffectUI.OwnerType.Inspector;
            bool result;

            if (ownerType == ParticleEffectUI.OwnerType.ParticleSystemWindow)
            {
                result = true;
            }
            else
            {
                ParticleSystem[] particleSystems = psUI.m_ParticleSystems;
                for (int i = 0; i < particleSystems.Length; i++)
                {
                    ParticleSystem ps = particleSystems[i];
                    if (this.m_SelectedParticleSystems.FirstOrDefault((ParticleSystem o) => o == ps) != null)
                    {
                        result = true;
                        return(result);
                    }
                }
                result = false;
            }
            return(result);
        }
Esempio n. 2
0
 public void OnGUI()
 {
     if (ParticleEffectUI.s_Texts == null)
     {
         ParticleEffectUI.s_Texts = new ParticleEffectUI.Texts();
     }
     if (this.m_Emitters == null)
     {
         return;
     }
     this.UpdateProperties();
     ParticleEffectUI.OwnerType ownerType  = (!(this.m_Owner is ParticleSystemInspector)) ? ParticleEffectUI.OwnerType.ParticleSystemWindow : ParticleEffectUI.OwnerType.Inspector;
     ParticleEffectUI.OwnerType ownerType2 = ownerType;
     if (ownerType2 != ParticleEffectUI.OwnerType.Inspector)
     {
         if (ownerType2 != ParticleEffectUI.OwnerType.ParticleSystemWindow)
         {
             Debug.LogError("Unhandled enum");
         }
         else
         {
             this.ClampWindowContentSizes();
             bool verticalLayout = ParticleEffectUI.m_VerticalLayout;
             if (verticalLayout)
             {
                 this.MultiParticleSystemGUI(verticalLayout);
                 this.WindowCurveEditorGUI(verticalLayout);
             }
             else
             {
                 GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                 this.MultiParticleSystemGUI(verticalLayout);
                 this.WindowCurveEditorGUI(verticalLayout);
                 GUILayout.EndHorizontal();
             }
         }
     }
     else
     {
         this.SingleParticleSystemGUI();
     }
     this.ApplyModifiedProperties();
 }
Esempio n. 3
0
 public bool IsParticleSystemUIVisible(ParticleSystemUI psUI)
 {
     ParticleEffectUI.OwnerType ownerType = (!(this.m_Owner is ParticleSystemInspector)) ? ParticleEffectUI.OwnerType.ParticleSystemWindow : ParticleEffectUI.OwnerType.Inspector;
     return(ownerType == ParticleEffectUI.OwnerType.ParticleSystemWindow || (ownerType == ParticleEffectUI.OwnerType.Inspector && psUI.m_ParticleSystem == this.m_SelectedParticleSystem));
 }