Exemplo n.º 1
0
 protected override void Init()
 {
     if (this.m_SubEmitters == null)
     {
         if (SubModuleUI.s_Texts == null)
         {
             SubModuleUI.s_Texts = new SubModuleUI.Texts();
         }
         this.m_SubEmitters = base.GetProperty("subEmitters");
     }
 }
Exemplo n.º 2
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (SubModuleUI.s_Texts == null)
     {
         SubModuleUI.s_Texts = new SubModuleUI.Texts();
     }
     UnityEngine.Object[,] expr_1B = new UnityEngine.Object[3, 2];
     expr_1B[0, 0] = this.m_SubEmitters[0, 0].objectReferenceValue;
     expr_1B[0, 1] = this.m_SubEmitters[0, 1].objectReferenceValue;
     expr_1B[1, 0] = this.m_SubEmitters[1, 0].objectReferenceValue;
     expr_1B[1, 1] = this.m_SubEmitters[1, 1].objectReferenceValue;
     expr_1B[2, 0] = this.m_SubEmitters[2, 0].objectReferenceValue;
     expr_1B[2, 1] = this.m_SubEmitters[2, 1].objectReferenceValue;
     UnityEngine.Object[,] array = expr_1B;
     for (int i = 0; i < 3; i++)
     {
         int num = base.GUIListOfFloatObjectToggleFields(SubModuleUI.s_Texts.subEmitterTypeTexts[i], new SerializedProperty[]
         {
             this.m_SubEmitters[i, 0],
             this.m_SubEmitters[i, 1]
         }, null, SubModuleUI.s_Texts.create, true);
         if (num != -1)
         {
             this.CreateAndAssignSubEmitter(this.m_SubEmitters[i, num], (SubModuleUI.SubEmitterType)i);
         }
     }
     UnityEngine.Object[,] expr_131 = new UnityEngine.Object[3, 2];
     expr_131[0, 0] = this.m_SubEmitters[0, 0].objectReferenceValue;
     expr_131[0, 1] = this.m_SubEmitters[0, 1].objectReferenceValue;
     expr_131[1, 0] = this.m_SubEmitters[1, 0].objectReferenceValue;
     expr_131[1, 1] = this.m_SubEmitters[1, 1].objectReferenceValue;
     expr_131[2, 0] = this.m_SubEmitters[2, 0].objectReferenceValue;
     expr_131[2, 1] = this.m_SubEmitters[2, 1].objectReferenceValue;
     UnityEngine.Object[,] array2 = expr_131;
     for (int j = 0; j < 3; j++)
     {
         for (int k = 0; k < 2; k++)
         {
             if (array[j, k] != array2[j, k])
             {
                 if (this.m_CheckObjectIndex == -1 && this.m_CheckObjectTypeIndex == -1)
                 {
                     EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Combine(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
                 }
                 this.m_CheckObjectTypeIndex = j;
                 this.m_CheckObjectIndex     = k;
             }
         }
     }
 }
Exemplo n.º 3
0
 public override void OnInspectorGUI(InitialModuleUI initial)
 {
     if (SubModuleUI.s_Texts == null)
     {
         SubModuleUI.s_Texts = new SubModuleUI.Texts();
     }
     if (this.m_ParticleSystemUI.multiEdit)
     {
         EditorGUILayout.HelpBox("Sub Emitter editing is only available when editing a single Particle System", MessageType.Info, true);
     }
     else
     {
         List <UnityEngine.Object> subEmitterProperties = this.GetSubEmitterProperties();
         GUILayout.BeginHorizontal(new GUILayoutOption[]
         {
             GUILayout.Height(16f)
         });
         GUILayout.Label("", ParticleSystemStyles.Get().label, new GUILayoutOption[]
         {
             GUILayout.ExpandWidth(true)
         });
         GUILayout.Label(SubModuleUI.s_Texts.inherit, ParticleSystemStyles.Get().label, new GUILayoutOption[]
         {
             GUILayout.Width(120f)
         });
         GUILayout.EndHorizontal();
         for (int i = 0; i < this.m_SubEmitters.arraySize; i++)
         {
             this.ShowSubEmitter(i);
         }
         List <UnityEngine.Object> subEmitterProperties2 = this.GetSubEmitterProperties();
         for (int j = 0; j < Mathf.Min(subEmitterProperties.Count, subEmitterProperties2.Count); j++)
         {
             if (subEmitterProperties[j] != subEmitterProperties2[j])
             {
                 if (this.m_CheckObjectIndex == -1)
                 {
                     EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Combine(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
                 }
                 this.m_CheckObjectIndex = j;
             }
         }
     }
 }
Exemplo n.º 4
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
     if (SubModuleUI.s_Texts == null)
     {
         SubModuleUI.s_Texts = new SubModuleUI.Texts();
     }
     Object[,] objectArray1 = new Object[3, 2] {
         { this.m_SubEmitters[0, 0].objectReferenceValue, this.m_SubEmitters[0, 1].objectReferenceValue }, { this.m_SubEmitters[1, 0].objectReferenceValue, this.m_SubEmitters[1, 1].objectReferenceValue }, { this.m_SubEmitters[2, 0].objectReferenceValue, this.m_SubEmitters[2, 1].objectReferenceValue }
     };
     for (int index1 = 0; index1 < 3; ++index1)
     {
         int index2 = this.GUIListOfFloatObjectToggleFields(SubModuleUI.s_Texts.subEmitterTypeTexts[index1], new SerializedProperty[2] {
             this.m_SubEmitters[index1, 0], this.m_SubEmitters[index1, 1]
         }, (EditorGUI.ObjectFieldValidator)null, SubModuleUI.s_Texts.create, 1 != 0);
         if (index2 != -1)
         {
             this.CreateAndAssignSubEmitter(this.m_SubEmitters[index1, index2], (SubModuleUI.SubEmitterType)index1);
         }
     }
     Object[,] objectArray2 = new Object[3, 2] {
         { this.m_SubEmitters[0, 0].objectReferenceValue, this.m_SubEmitters[0, 1].objectReferenceValue }, { this.m_SubEmitters[1, 0].objectReferenceValue, this.m_SubEmitters[1, 1].objectReferenceValue }, { this.m_SubEmitters[2, 0].objectReferenceValue, this.m_SubEmitters[2, 1].objectReferenceValue }
     };
     for (int index1 = 0; index1 < 3; ++index1)
     {
         for (int index2 = 0; index2 < 2; ++index2)
         {
             if (objectArray1[index1, index2] != objectArray2[index1, index2])
             {
                 if (this.m_CheckObjectIndex == -1 && this.m_CheckObjectTypeIndex == -1)
                 {
                     EditorApplication.update += new EditorApplication.CallbackFunction(this.Update);
                 }
                 this.m_CheckObjectTypeIndex = index1;
                 this.m_CheckObjectIndex     = index2;
             }
         }
     }
 }
Exemplo n.º 5
0
        public override void OnInspectorGUI(ParticleSystem s)
        {
            if (SubModuleUI.s_Texts == null)
            {
                SubModuleUI.s_Texts = new SubModuleUI.Texts();
            }
            List <UnityEngine.Object> subEmitterProperties = this.GetSubEmitterProperties();

            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.Label("", ParticleSystemStyles.Get().label, new GUILayoutOption[]
            {
                GUILayout.ExpandWidth(true)
            });
            GUILayout.Label(SubModuleUI.s_Texts.inherit, ParticleSystemStyles.Get().label, new GUILayoutOption[]
            {
                GUILayout.Width(120f)
            });
            GUILayout.EndHorizontal();
            for (int i = 0; i < this.m_SubEmitters.arraySize; i++)
            {
                this.ShowSubEmitter(i);
            }
            List <UnityEngine.Object> subEmitterProperties2 = this.GetSubEmitterProperties();

            for (int j = 0; j < Mathf.Min(subEmitterProperties.Count, subEmitterProperties2.Count); j++)
            {
                if (subEmitterProperties[j] != subEmitterProperties2[j])
                {
                    if (this.m_CheckObjectIndex == -1)
                    {
                        EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Combine(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
                    }
                    this.m_CheckObjectIndex = j;
                }
            }
        }
Exemplo n.º 6
0
 public override void OnInspectorGUI(ParticleSystem s)
 {
   if (SubModuleUI.s_Texts == null)
     SubModuleUI.s_Texts = new SubModuleUI.Texts();
   Object[,] objectArray1 = new Object[3, 2]{ { this.m_SubEmitters[0, 0].objectReferenceValue, this.m_SubEmitters[0, 1].objectReferenceValue }, { this.m_SubEmitters[1, 0].objectReferenceValue, this.m_SubEmitters[1, 1].objectReferenceValue }, { this.m_SubEmitters[2, 0].objectReferenceValue, this.m_SubEmitters[2, 1].objectReferenceValue } };
   for (int index1 = 0; index1 < 3; ++index1)
   {
     int index2 = this.GUIListOfFloatObjectToggleFields(SubModuleUI.s_Texts.subEmitterTypeTexts[index1], new SerializedProperty[2]{ this.m_SubEmitters[index1, 0], this.m_SubEmitters[index1, 1] }, (EditorGUI.ObjectFieldValidator) null, SubModuleUI.s_Texts.create, 1 != 0);
     if (index2 != -1)
       this.CreateAndAssignSubEmitter(this.m_SubEmitters[index1, index2], (SubModuleUI.SubEmitterType) index1);
   }
   Object[,] objectArray2 = new Object[3, 2]{ { this.m_SubEmitters[0, 0].objectReferenceValue, this.m_SubEmitters[0, 1].objectReferenceValue }, { this.m_SubEmitters[1, 0].objectReferenceValue, this.m_SubEmitters[1, 1].objectReferenceValue }, { this.m_SubEmitters[2, 0].objectReferenceValue, this.m_SubEmitters[2, 1].objectReferenceValue } };
   for (int index1 = 0; index1 < 3; ++index1)
   {
     for (int index2 = 0; index2 < 2; ++index2)
     {
       if (objectArray1[index1, index2] != objectArray2[index1, index2])
       {
         if (this.m_CheckObjectIndex == -1 && this.m_CheckObjectTypeIndex == -1)
           EditorApplication.update += new EditorApplication.CallbackFunction(this.Update);
         this.m_CheckObjectTypeIndex = index1;
         this.m_CheckObjectIndex = index2;
       }
     }
   }
 }
Exemplo n.º 7
0
		public override void OnInspectorGUI(ParticleSystem s)
		{
			if (SubModuleUI.s_Texts == null)
			{
				SubModuleUI.s_Texts = new SubModuleUI.Texts();
			}
			UnityEngine.Object[,] expr_1B = new UnityEngine.Object[3, 2];
			expr_1B[0, 0] = this.m_SubEmitters[0, 0].objectReferenceValue;
			expr_1B[0, 1] = this.m_SubEmitters[0, 1].objectReferenceValue;
			expr_1B[1, 0] = this.m_SubEmitters[1, 0].objectReferenceValue;
			expr_1B[1, 1] = this.m_SubEmitters[1, 1].objectReferenceValue;
			expr_1B[2, 0] = this.m_SubEmitters[2, 0].objectReferenceValue;
			expr_1B[2, 1] = this.m_SubEmitters[2, 1].objectReferenceValue;
			UnityEngine.Object[,] array = expr_1B;
			for (int i = 0; i < 3; i++)
			{
				int num = base.GUIListOfFloatObjectToggleFields(SubModuleUI.s_Texts.subEmitterTypeTexts[i], new SerializedProperty[]
				{
					this.m_SubEmitters[i, 0],
					this.m_SubEmitters[i, 1]
				}, null, SubModuleUI.s_Texts.create, true);
				if (num != -1)
				{
					this.CreateAndAssignSubEmitter(this.m_SubEmitters[i, num], (SubModuleUI.SubEmitterType)i);
				}
			}
			UnityEngine.Object[,] expr_131 = new UnityEngine.Object[3, 2];
			expr_131[0, 0] = this.m_SubEmitters[0, 0].objectReferenceValue;
			expr_131[0, 1] = this.m_SubEmitters[0, 1].objectReferenceValue;
			expr_131[1, 0] = this.m_SubEmitters[1, 0].objectReferenceValue;
			expr_131[1, 1] = this.m_SubEmitters[1, 1].objectReferenceValue;
			expr_131[2, 0] = this.m_SubEmitters[2, 0].objectReferenceValue;
			expr_131[2, 1] = this.m_SubEmitters[2, 1].objectReferenceValue;
			UnityEngine.Object[,] array2 = expr_131;
			for (int j = 0; j < 3; j++)
			{
				for (int k = 0; k < 2; k++)
				{
					if (array[j, k] != array2[j, k])
					{
						if (this.m_CheckObjectIndex == -1 && this.m_CheckObjectTypeIndex == -1)
						{
							EditorApplication.update = (EditorApplication.CallbackFunction)Delegate.Combine(EditorApplication.update, new EditorApplication.CallbackFunction(this.Update));
						}
						this.m_CheckObjectTypeIndex = j;
						this.m_CheckObjectIndex = k;
					}
				}
			}
		}