Exemplo n.º 1
0
 protected virtual void SetVisibilityState(ModuleUI.VisibilityState newState)
 {
     if (newState != this.m_VisibilityState)
     {
         if (newState == ModuleUI.VisibilityState.VisibleAndFolded)
         {
             ParticleSystemCurveEditor particleSystemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
             foreach (SerializedProperty current in this.m_ModuleCurves)
             {
                 if (particleSystemCurveEditor.IsAdded(current))
                 {
                     this.m_CurvesRemovedWhenFolded.Add(current);
                     particleSystemCurveEditor.SetVisible(current, false);
                 }
             }
             particleSystemCurveEditor.Refresh();
         }
         else if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
         {
             ParticleSystemCurveEditor particleSystemCurveEditor2 = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
             foreach (SerializedProperty current2 in this.m_CurvesRemovedWhenFolded)
             {
                 particleSystemCurveEditor2.SetVisible(current2, true);
             }
             this.m_CurvesRemovedWhenFolded.Clear();
             particleSystemCurveEditor2.Refresh();
         }
         this.m_VisibilityState = newState;
         SessionState.SetInt(base.GetUniqueModuleName(), (int)this.m_VisibilityState);
         if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
         {
             this.Init();
         }
     }
 }
Exemplo n.º 2
0
 private void Setup(ParticleSystemUI owner, SerializedObject o, string name, string displayName, ModuleUI.VisibilityState defaultVisibilityState)
 {
     this.m_ParticleSystemUI = owner;
     this.m_DisplayName      = displayName;
     this.m_Enabled          = !(this is RendererModuleUI) ? this.GetProperty("enabled") : this.GetProperty0("m_Enabled");
     this.m_VisibilityState  = (ModuleUI.VisibilityState)SessionState.GetInt(this.GetUniqueModuleName(), (int)defaultVisibilityState);
     this.CheckVisibilityState();
     if (!this.foldout)
     {
         return;
     }
     this.Init();
 }
Exemplo n.º 3
0
 protected override void SetVisibilityState(ModuleUI.VisibilityState newState)
 {
     base.SetVisibilityState(newState);
     if (newState != ModuleUI.VisibilityState.VisibleAndFoldedOut)
     {
         CollisionModuleUI.s_SelectedTransform = null;
         this.editingPlanes = false;
     }
     else
     {
         this.SyncVisualization();
     }
 }
Exemplo n.º 4
0
 protected override void SetVisibilityState(ModuleUI.VisibilityState newState)
 {
     base.SetVisibilityState(newState);
     if (newState != ModuleUI.VisibilityState.VisibleAndFoldedOut)
     {
         Tools.s_Hidden = false;
         CollisionModuleUI.m_SelectedTransform = (Transform)null;
         ParticleEffectUtils.ClearPlanes();
     }
     else
     {
         this.SyncVisualization();
     }
 }
Exemplo n.º 5
0
 protected virtual void SetVisibilityState(ModuleUI.VisibilityState newState)
 {
     if (newState == this.m_VisibilityState)
     {
         return;
     }
     if (newState == ModuleUI.VisibilityState.VisibleAndFolded)
     {
         ParticleSystemCurveEditor systemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
         using (List <SerializedProperty> .Enumerator enumerator = this.m_ModuleCurves.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 SerializedProperty current = enumerator.Current;
                 if (systemCurveEditor.IsAdded(current))
                 {
                     this.m_CurvesRemovedWhenFolded.Add(current);
                     systemCurveEditor.SetVisible(current, false);
                 }
             }
         }
         systemCurveEditor.Refresh();
     }
     else if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
     {
         ParticleSystemCurveEditor systemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
         using (List <SerializedProperty> .Enumerator enumerator = this.m_CurvesRemovedWhenFolded.GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 SerializedProperty current = enumerator.Current;
                 systemCurveEditor.SetVisible(current, true);
             }
         }
         this.m_CurvesRemovedWhenFolded.Clear();
         systemCurveEditor.Refresh();
     }
     this.m_VisibilityState = newState;
     SessionState.SetInt(this.GetUniqueModuleName(), (int)this.m_VisibilityState);
     if (newState != ModuleUI.VisibilityState.VisibleAndFoldedOut)
     {
         return;
     }
     this.Init();
 }
Exemplo n.º 6
0
 protected virtual void SetVisibilityState(ModuleUI.VisibilityState newState)
 {
   if (newState == this.m_VisibilityState)
     return;
   if (newState == ModuleUI.VisibilityState.VisibleAndFolded)
   {
     ParticleSystemCurveEditor systemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
     using (List<SerializedProperty>.Enumerator enumerator = this.m_ModuleCurves.GetEnumerator())
     {
       while (enumerator.MoveNext())
       {
         SerializedProperty current = enumerator.Current;
         if (systemCurveEditor.IsAdded(current))
         {
           this.m_CurvesRemovedWhenFolded.Add(current);
           systemCurveEditor.SetVisible(current, false);
         }
       }
     }
     systemCurveEditor.Refresh();
   }
   else if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
   {
     ParticleSystemCurveEditor systemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
     using (List<SerializedProperty>.Enumerator enumerator = this.m_CurvesRemovedWhenFolded.GetEnumerator())
     {
       while (enumerator.MoveNext())
       {
         SerializedProperty current = enumerator.Current;
         systemCurveEditor.SetVisible(current, true);
       }
     }
     this.m_CurvesRemovedWhenFolded.Clear();
     systemCurveEditor.Refresh();
   }
   this.m_VisibilityState = newState;
   SessionState.SetInt(this.GetUniqueModuleName(), (int) this.m_VisibilityState);
   if (newState != ModuleUI.VisibilityState.VisibleAndFoldedOut)
     return;
   this.Init();
 }
Exemplo n.º 7
0
 private void Setup(ParticleSystemUI owner, SerializedObject o, string name, string displayName, ModuleUI.VisibilityState defaultVisibilityState)
 {
   this.m_ParticleSystemUI = owner;
   this.m_DisplayName = displayName;
   this.m_Enabled = !(this is RendererModuleUI) ? this.GetProperty("enabled") : this.GetProperty0("m_Enabled");
   this.m_VisibilityState = (ModuleUI.VisibilityState) SessionState.GetInt(this.GetUniqueModuleName(), (int) defaultVisibilityState);
   this.CheckVisibilityState();
   if (!this.foldout)
     return;
   this.Init();
 }
Exemplo n.º 8
0
 public ModuleUI(ParticleSystemUI owner, SerializedObject o, string name, string displayName, ModuleUI.VisibilityState initialVisibilityState) : base(o, name)
 {
     this.Setup(owner, o, name, displayName, initialVisibilityState);
 }
Exemplo n.º 9
0
		protected virtual void SetVisibilityState(ModuleUI.VisibilityState newState)
		{
			if (newState != this.m_VisibilityState)
			{
				if (newState == ModuleUI.VisibilityState.VisibleAndFolded)
				{
					ParticleSystemCurveEditor particleSystemCurveEditor = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
					foreach (SerializedProperty current in this.m_ModuleCurves)
					{
						if (particleSystemCurveEditor.IsAdded(current))
						{
							this.m_CurvesRemovedWhenFolded.Add(current);
							particleSystemCurveEditor.SetVisible(current, false);
						}
					}
					particleSystemCurveEditor.Refresh();
				}
				else
				{
					if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
					{
						ParticleSystemCurveEditor particleSystemCurveEditor2 = this.m_ParticleSystemUI.m_ParticleEffectUI.GetParticleSystemCurveEditor();
						foreach (SerializedProperty current2 in this.m_CurvesRemovedWhenFolded)
						{
							particleSystemCurveEditor2.SetVisible(current2, true);
						}
						this.m_CurvesRemovedWhenFolded.Clear();
						particleSystemCurveEditor2.Refresh();
					}
				}
				this.m_VisibilityState = newState;
				InspectorState.SetInt(base.GetUniqueModuleName(), (int)this.m_VisibilityState);
				if (newState == ModuleUI.VisibilityState.VisibleAndFoldedOut)
				{
					this.Init();
				}
			}
		}
Exemplo n.º 10
0
		private void Setup(ParticleSystemUI owner, SerializedObject o, string name, string displayName, ModuleUI.VisibilityState defaultVisibilityState)
		{
			this.m_ParticleSystemUI = owner;
			this.m_DisplayName = displayName;
			if (this is RendererModuleUI)
			{
				this.m_Enabled = base.GetProperty0("m_Enabled");
			}
			else
			{
				this.m_Enabled = base.GetProperty("enabled");
			}
			this.m_VisibilityState = (ModuleUI.VisibilityState)InspectorState.GetInt(base.GetUniqueModuleName(), (int)defaultVisibilityState);
			this.CheckVisibilityState();
			if (this.foldout)
			{
				this.Init();
			}
		}