private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] euiArray1 = new ModuleUI[0x16]; euiArray1[0] = new InitialModuleUI(e, so, s_ModuleNames[num++]); euiArray1[1] = new EmissionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[2] = new ShapeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[3] = new VelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[4] = new ClampVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[5] = new InheritVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[6] = new ForceModuleUI(e, so, s_ModuleNames[num++]); euiArray1[7] = new ColorModuleUI(e, so, s_ModuleNames[num++]); euiArray1[8] = new ColorByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[9] = new SizeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[10] = new SizeByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[11] = new RotationModuleUI(e, so, s_ModuleNames[num++]); euiArray1[12] = new RotationByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[13] = new ExternalForcesModuleUI(e, so, s_ModuleNames[num++]); euiArray1[14] = new NoiseModuleUI(e, so, s_ModuleNames[num++]); euiArray1[15] = new CollisionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x10] = new TriggerModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x11] = new SubModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x12] = new UVModuleUI(e, so, s_ModuleNames[num++]); euiArray1[0x13] = new LightsModuleUI(e, so, s_ModuleNames[num++]); euiArray1[20] = new TrailModuleUI(e, so, s_ModuleNames[num++]); return(euiArray1); }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] expr_0A = new ModuleUI[22]; expr_0A[0] = new InitialModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[1] = new EmissionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[2] = new ShapeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[3] = new VelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[4] = new ClampVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[5] = new InheritVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[6] = new ForceModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[7] = new ColorModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[8] = new ColorByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[9] = new SizeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[10] = new SizeByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[11] = new RotationModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[12] = new RotationByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[13] = new ExternalForcesModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[14] = new NoiseModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[15] = new CollisionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[16] = new TriggerModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[17] = new SubModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[18] = new UVModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[19] = new LightsModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_0A[20] = new TrailModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); return(expr_0A); }
private void DoListOfPlanesGUI() { int num = base.GUIListOfFloatObjectToggleFields(CollisionModuleUI.s_Texts.planes, this.m_ShownPlanes, null, CollisionModuleUI.s_Texts.createPlane, true); if (num >= 0) { GameObject gameObject = CollisionModuleUI.CreateEmptyGameObject("Plane Transform " + (num + 1), this.m_ParticleSystemUI.m_ParticleSystem); gameObject.transform.localPosition = new Vector3(0f, 0f, (float)(10 + num)); gameObject.transform.localEulerAngles = new Vector3(-90f, 0f, 0f); this.m_ShownPlanes[num].objectReferenceValue = gameObject; this.SyncVisualization(); } Rect rect = GUILayoutUtility.GetRect(0f, 16f); rect.x = rect.xMax - 24f - 5f; rect.width = 12f; if (this.m_ShownPlanes.Length > 1 && ModuleUI.MinusButton(rect)) { this.m_ShownPlanes[this.m_ShownPlanes.Length - 1].objectReferenceValue = null; List <SerializedProperty> list = new List <SerializedProperty>(this.m_ShownPlanes); list.RemoveAt(list.Count - 1); this.m_ShownPlanes = list.ToArray(); } if (this.m_ShownPlanes.Length < 6) { rect.x += 17f; if (ModuleUI.PlusButton(rect)) { List <SerializedProperty> list2 = new List <SerializedProperty>(this.m_ShownPlanes); list2.Add(this.m_Planes[list2.Count]); this.m_ShownPlanes = list2.ToArray(); } } }
private void DoListOfPlanesGUI() { if (!this.IsListOfPlanesValid()) { EditorGUILayout.HelpBox("Plane list editing is only available when all selected systems contain the same number of planes", MessageType.Info, true); } else { EditorGUI.BeginChangeCheck(); int num = base.GUIListOfFloatObjectToggleFields(CollisionModuleUI.s_Texts.planes, this.m_ShownPlanes, null, CollisionModuleUI.s_Texts.createPlane, !this.m_ParticleSystemUI.multiEdit, new GUILayoutOption[0]); bool flag = EditorGUI.EndChangeCheck(); if (num >= 0 && !this.m_ParticleSystemUI.multiEdit) { GameObject gameObject = CollisionModuleUI.CreateEmptyGameObject("Plane Transform " + (num + 1), this.m_ParticleSystemUI.m_ParticleSystems[0]); gameObject.transform.localPosition = new Vector3(0f, 0f, (float)(10 + num)); gameObject.transform.localEulerAngles = new Vector3(-90f, 0f, 0f); this.m_ShownPlanes[num].objectReferenceValue = gameObject; flag = true; } Rect rect = GUILayoutUtility.GetRect(0f, 16f); rect.x = rect.xMax - 24f - 5f; rect.width = 12f; if (this.m_ShownPlanes.Length > 1) { if (ModuleUI.MinusButton(rect)) { this.m_ShownPlanes[this.m_ShownPlanes.Length - 1].objectReferenceValue = null; List <SerializedProperty> list = new List <SerializedProperty>(this.m_ShownPlanes); list.RemoveAt(list.Count - 1); this.m_ShownPlanes = list.ToArray(); flag = true; } } if (this.m_ShownPlanes.Length < 6 && !this.m_ParticleSystemUI.multiEdit) { rect.x += 17f; if (ModuleUI.PlusButton(rect)) { List <SerializedProperty> list2 = new List <SerializedProperty>(this.m_ShownPlanes); list2.Add(this.m_Planes[list2.Count]); this.m_ShownPlanes = list2.ToArray(); } } if (flag) { this.SyncVisualization(); } } }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] euiArray1 = new ModuleUI[0x11]; euiArray1[0] = new InitialModuleUI(e, so, s_ModuleNames[num++]); euiArray1[1] = new EmissionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[2] = new ShapeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[3] = new VelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[4] = new ClampVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[5] = new ForceModuleUI(e, so, s_ModuleNames[num++]); euiArray1[6] = new ColorModuleUI(e, so, s_ModuleNames[num++]); euiArray1[7] = new ColorByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[8] = new SizeModuleUI(e, so, s_ModuleNames[num++]); euiArray1[9] = new SizeByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[10] = new RotationModuleUI(e, so, s_ModuleNames[num++]); euiArray1[11] = new RotationByVelocityModuleUI(e, so, s_ModuleNames[num++]); euiArray1[12] = new ExternalForcesModuleUI(e, so, s_ModuleNames[num++]); euiArray1[13] = new CollisionModuleUI(e, so, s_ModuleNames[num++]); euiArray1[14] = new SubModuleUI(e, so, s_ModuleNames[num++]); euiArray1[15] = new UVModuleUI(e, so, s_ModuleNames[num++]); return euiArray1; }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] expr_09 = new ModuleUI[17]; expr_09[0] = new InitialModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[1] = new EmissionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[2] = new ShapeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[3] = new VelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[4] = new ClampVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[5] = new ForceModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[6] = new ColorModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[7] = new ColorByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[8] = new SizeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[9] = new SizeByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[10] = new RotationModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[11] = new RotationByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[12] = new ExternalForcesModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[13] = new CollisionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[14] = new SubModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[15] = new UVModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); return(expr_09); }
private void DoListOfPlanesGUI() { int index = this.GUIListOfFloatObjectToggleFields(CollisionModuleUI.s_Texts.planes, this.m_ShownPlanes, (EditorGUI.ObjectFieldValidator)null, CollisionModuleUI.s_Texts.createPlane, true); if (index >= 0) { GameObject emptyGameObject = CollisionModuleUI.CreateEmptyGameObject("Plane Transform " + (object)(index + 1), this.m_ParticleSystemUI.m_ParticleSystem); emptyGameObject.transform.localPosition = new Vector3(0.0f, 0.0f, (float)(10 + index)); emptyGameObject.transform.localEulerAngles = new Vector3(-90f, 0.0f, 0.0f); this.m_ShownPlanes[index].objectReferenceValue = (Object)emptyGameObject; this.SyncVisualization(); } Rect rect = GUILayoutUtility.GetRect(0.0f, 16f); rect.x = (float)((double)rect.xMax - 24.0 - 5.0); rect.width = 12f; if (this.m_ShownPlanes.Length > 1 && ModuleUI.MinusButton(rect)) { this.m_ShownPlanes[this.m_ShownPlanes.Length - 1].objectReferenceValue = (Object)null; List <SerializedProperty> serializedPropertyList = new List <SerializedProperty>((IEnumerable <SerializedProperty>) this.m_ShownPlanes); serializedPropertyList.RemoveAt(serializedPropertyList.Count - 1); this.m_ShownPlanes = serializedPropertyList.ToArray(); } if (this.m_ShownPlanes.Length >= 6) { return; } rect.x += 17f; if (!ModuleUI.PlusButton(rect)) { return; } List <SerializedProperty> serializedPropertyList1 = new List <SerializedProperty>((IEnumerable <SerializedProperty>) this.m_ShownPlanes); serializedPropertyList1.Add(this.m_Planes[serializedPropertyList1.Count]); this.m_ShownPlanes = serializedPropertyList1.ToArray(); }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num = 0; ModuleUI[] expr_09 = new ModuleUI[17]; expr_09[0] = new InitialModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[1] = new EmissionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[2] = new ShapeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[3] = new VelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[4] = new ClampVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[5] = new ForceModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[6] = new ColorModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[7] = new ColorByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[8] = new SizeModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[9] = new SizeByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[10] = new RotationModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[11] = new RotationByVelocityModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[12] = new ExternalForcesModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[13] = new CollisionModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[14] = new SubModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); expr_09[15] = new UVModuleUI(e, so, ParticleSystemUI.s_ModuleNames[num++]); return expr_09; }
private void CollisionPlanesSceneGUI() { if (this.m_ScenePlanes.Count != 0) { Event current = Event.current; Color color = Handles.color; Color color2 = new Color(1f, 1f, 1f, 0.5f); for (int i = 0; i < this.m_ScenePlanes.Count; i++) { if (!(this.m_ScenePlanes[i] == null)) { Transform transform = this.m_ScenePlanes[i]; Vector3 position = transform.position; Quaternion rotation = transform.rotation; Vector3 axis = rotation * Vector3.right; Vector3 normal = rotation * Vector3.up; Vector3 axis2 = rotation * Vector3.forward; bool flag = EditorApplication.isPlaying && transform.gameObject.isStatic; if (this.editingPlanes) { if (object.ReferenceEquals(CollisionModuleUI.s_SelectedTransform, transform)) { EditorGUI.BeginChangeCheck(); Vector3 position2 = transform.position; Quaternion rotation2 = transform.rotation; using (new EditorGUI.DisabledScope(flag)) { if (flag) { Handles.ShowStaticLabel(position); } if (EditMode.editMode == EditMode.SceneViewEditMode.ParticleSystemCollisionModulePlanesMove) { position2 = Handles.PositionHandle(position, rotation); } else if (EditMode.editMode == EditMode.SceneViewEditMode.ParticleSystemCollisionModulePlanesRotate) { rotation2 = Handles.RotationHandle(rotation, position); } } if (EditorGUI.EndChangeCheck()) { Undo.RecordObject(transform, "Modified Collision Plane Transform"); transform.position = position2; transform.rotation = rotation2; ParticleSystemEditorUtils.PerformCompleteResimulation(); } } else { float num = HandleUtility.GetHandleSize(position) * 0.6f; EventType eventType = current.type; if (current.type == EventType.Ignore && current.rawType == EventType.MouseUp) { eventType = current.rawType; } Vector3 arg_1F3_0 = position; Quaternion arg_1F3_1 = Quaternion.identity; float arg_1F3_2 = num; Vector3 arg_1F3_3 = Vector3.zero; if (CollisionModuleUI.< > f__mg$cache0 == null) { CollisionModuleUI.< > f__mg$cache0 = new Handles.CapFunction(Handles.RectangleHandleCap); } Handles.FreeMoveHandle(arg_1F3_0, arg_1F3_1, arg_1F3_2, arg_1F3_3, CollisionModuleUI.< > f__mg$cache0); if (eventType == EventType.MouseDown && current.type == EventType.Used) { CollisionModuleUI.s_SelectedTransform = transform; GUIUtility.hotControl = 0; } } } Handles.color = color2; Color color3 = Handles.s_ColliderHandleColor * 0.9f; if (flag) { color3.a *= 0.2f; } if (CollisionModuleUI.m_PlaneVisualizationType == CollisionModuleUI.PlaneVizType.Grid) { CollisionModuleUI.DrawGrid(position, axis, axis2, normal, color3); } else { CollisionModuleUI.DrawSolidPlane(position, rotation, color3, Color.yellow); } } } Handles.color = color; } }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num1 = 0; ModuleUI[] moduleUiArray = new ModuleUI[18]; int index1 = 0; ParticleSystemUI owner1 = e; SerializedObject o1 = so; string[] moduleNames1 = ParticleSystemUI.s_ModuleNames; int index2 = num1; int num2 = 1; int num3 = index2 + num2; string displayName1 = moduleNames1[index2]; InitialModuleUI initialModuleUi = new InitialModuleUI(owner1, o1, displayName1); moduleUiArray[index1] = (ModuleUI) initialModuleUi; int index3 = 1; ParticleSystemUI owner2 = e; SerializedObject o2 = so; string[] moduleNames2 = ParticleSystemUI.s_ModuleNames; int index4 = num3; int num4 = 1; int num5 = index4 + num4; string displayName2 = moduleNames2[index4]; EmissionModuleUI emissionModuleUi = new EmissionModuleUI(owner2, o2, displayName2); moduleUiArray[index3] = (ModuleUI) emissionModuleUi; int index5 = 2; ParticleSystemUI owner3 = e; SerializedObject o3 = so; string[] moduleNames3 = ParticleSystemUI.s_ModuleNames; int index6 = num5; int num6 = 1; int num7 = index6 + num6; string displayName3 = moduleNames3[index6]; ShapeModuleUI shapeModuleUi = new ShapeModuleUI(owner3, o3, displayName3); moduleUiArray[index5] = (ModuleUI) shapeModuleUi; int index7 = 3; ParticleSystemUI owner4 = e; SerializedObject o4 = so; string[] moduleNames4 = ParticleSystemUI.s_ModuleNames; int index8 = num7; int num8 = 1; int num9 = index8 + num8; string displayName4 = moduleNames4[index8]; VelocityModuleUI velocityModuleUi1 = new VelocityModuleUI(owner4, o4, displayName4); moduleUiArray[index7] = (ModuleUI) velocityModuleUi1; int index9 = 4; ParticleSystemUI owner5 = e; SerializedObject o5 = so; string[] moduleNames5 = ParticleSystemUI.s_ModuleNames; int index10 = num9; int num10 = 1; int num11 = index10 + num10; string displayName5 = moduleNames5[index10]; ClampVelocityModuleUI velocityModuleUi2 = new ClampVelocityModuleUI(owner5, o5, displayName5); moduleUiArray[index9] = (ModuleUI) velocityModuleUi2; int index11 = 5; ParticleSystemUI owner6 = e; SerializedObject o6 = so; string[] moduleNames6 = ParticleSystemUI.s_ModuleNames; int index12 = num11; int num12 = 1; int num13 = index12 + num12; string displayName6 = moduleNames6[index12]; InheritVelocityModuleUI velocityModuleUi3 = new InheritVelocityModuleUI(owner6, o6, displayName6); moduleUiArray[index11] = (ModuleUI) velocityModuleUi3; int index13 = 6; ParticleSystemUI owner7 = e; SerializedObject o7 = so; string[] moduleNames7 = ParticleSystemUI.s_ModuleNames; int index14 = num13; int num14 = 1; int num15 = index14 + num14; string displayName7 = moduleNames7[index14]; ForceModuleUI forceModuleUi = new ForceModuleUI(owner7, o7, displayName7); moduleUiArray[index13] = (ModuleUI) forceModuleUi; int index15 = 7; ParticleSystemUI owner8 = e; SerializedObject o8 = so; string[] moduleNames8 = ParticleSystemUI.s_ModuleNames; int index16 = num15; int num16 = 1; int num17 = index16 + num16; string displayName8 = moduleNames8[index16]; ColorModuleUI colorModuleUi = new ColorModuleUI(owner8, o8, displayName8); moduleUiArray[index15] = (ModuleUI) colorModuleUi; int index17 = 8; ParticleSystemUI owner9 = e; SerializedObject o9 = so; string[] moduleNames9 = ParticleSystemUI.s_ModuleNames; int index18 = num17; int num18 = 1; int num19 = index18 + num18; string displayName9 = moduleNames9[index18]; ColorByVelocityModuleUI velocityModuleUi4 = new ColorByVelocityModuleUI(owner9, o9, displayName9); moduleUiArray[index17] = (ModuleUI) velocityModuleUi4; int index19 = 9; ParticleSystemUI owner10 = e; SerializedObject o10 = so; string[] moduleNames10 = ParticleSystemUI.s_ModuleNames; int index20 = num19; int num20 = 1; int num21 = index20 + num20; string displayName10 = moduleNames10[index20]; SizeModuleUI sizeModuleUi = new SizeModuleUI(owner10, o10, displayName10); moduleUiArray[index19] = (ModuleUI) sizeModuleUi; int index21 = 10; ParticleSystemUI owner11 = e; SerializedObject o11 = so; string[] moduleNames11 = ParticleSystemUI.s_ModuleNames; int index22 = num21; int num22 = 1; int num23 = index22 + num22; string displayName11 = moduleNames11[index22]; SizeByVelocityModuleUI velocityModuleUi5 = new SizeByVelocityModuleUI(owner11, o11, displayName11); moduleUiArray[index21] = (ModuleUI) velocityModuleUi5; int index23 = 11; ParticleSystemUI owner12 = e; SerializedObject o12 = so; string[] moduleNames12 = ParticleSystemUI.s_ModuleNames; int index24 = num23; int num24 = 1; int num25 = index24 + num24; string displayName12 = moduleNames12[index24]; RotationModuleUI rotationModuleUi = new RotationModuleUI(owner12, o12, displayName12); moduleUiArray[index23] = (ModuleUI) rotationModuleUi; int index25 = 12; ParticleSystemUI owner13 = e; SerializedObject o13 = so; string[] moduleNames13 = ParticleSystemUI.s_ModuleNames; int index26 = num25; int num26 = 1; int num27 = index26 + num26; string displayName13 = moduleNames13[index26]; RotationByVelocityModuleUI velocityModuleUi6 = new RotationByVelocityModuleUI(owner13, o13, displayName13); moduleUiArray[index25] = (ModuleUI) velocityModuleUi6; int index27 = 13; ParticleSystemUI owner14 = e; SerializedObject o14 = so; string[] moduleNames14 = ParticleSystemUI.s_ModuleNames; int index28 = num27; int num28 = 1; int num29 = index28 + num28; string displayName14 = moduleNames14[index28]; ExternalForcesModuleUI externalForcesModuleUi = new ExternalForcesModuleUI(owner14, o14, displayName14); moduleUiArray[index27] = (ModuleUI) externalForcesModuleUi; int index29 = 14; ParticleSystemUI owner15 = e; SerializedObject o15 = so; string[] moduleNames15 = ParticleSystemUI.s_ModuleNames; int index30 = num29; int num30 = 1; int num31 = index30 + num30; string displayName15 = moduleNames15[index30]; CollisionModuleUI collisionModuleUi = new CollisionModuleUI(owner15, o15, displayName15); moduleUiArray[index29] = (ModuleUI) collisionModuleUi; int index31 = 15; ParticleSystemUI owner16 = e; SerializedObject o16 = so; string[] moduleNames16 = ParticleSystemUI.s_ModuleNames; int index32 = num31; int num32 = 1; int num33 = index32 + num32; string displayName16 = moduleNames16[index32]; SubModuleUI subModuleUi = new SubModuleUI(owner16, o16, displayName16); moduleUiArray[index31] = (ModuleUI) subModuleUi; int index33 = 16; ParticleSystemUI owner17 = e; SerializedObject o17 = so; string[] moduleNames17 = ParticleSystemUI.s_ModuleNames; int index34 = num33; int num34 = 1; int num35 = index34 + num34; string displayName17 = moduleNames17[index34]; UVModuleUI uvModuleUi = new UVModuleUI(owner17, o17, displayName17); moduleUiArray[index33] = (ModuleUI) uvModuleUi; return moduleUiArray; }
public override void OnInspectorGUI(ParticleSystem s) { if (CollisionModuleUI.s_Texts == null) { CollisionModuleUI.s_Texts = new CollisionModuleUI.Texts(); } string[] options = new string[2] { "Planes", "World" }; CollisionModuleUI.CollisionTypes collisionTypes = (CollisionModuleUI.CollisionTypes)ModuleUI.GUIPopup(string.Empty, this.m_Type, options); CollisionModuleUI.CollisionModes collisionModes = CollisionModuleUI.CollisionModes.Mode3D; if (collisionTypes == CollisionModuleUI.CollisionTypes.Plane) { this.DoListOfPlanesGUI(); EditorGUI.BeginChangeCheck(); this.m_PlaneVisualizationType = (CollisionModuleUI.PlaneVizType)ModuleUI.GUIPopup(CollisionModuleUI.s_Texts.visualization, (int)this.m_PlaneVisualizationType, this.m_PlaneVizTypeNames); if (EditorGUI.EndChangeCheck()) { EditorPrefs.SetInt("PlaneColisionVizType", (int)this.m_PlaneVisualizationType); if (this.m_PlaneVisualizationType == CollisionModuleUI.PlaneVizType.Solid) { this.SyncVisualization(); } else { ParticleEffectUtils.ClearPlanes(); } } EditorGUI.BeginChangeCheck(); this.m_ScaleGrid = ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.scalePlane, this.m_ScaleGrid, "f2"); if (EditorGUI.EndChangeCheck()) { this.m_ScaleGrid = Mathf.Max(0.0f, this.m_ScaleGrid); EditorPrefs.SetFloat("ScalePlaneColision", this.m_ScaleGrid); this.SyncVisualization(); } } else { collisionModes = (CollisionModuleUI.CollisionModes)ModuleUI.GUIPopup(CollisionModuleUI.s_Texts.collisionMode, this.m_CollisionMode, new string[2] { "3D", "2D" }); } EditorGUI.BeginChangeCheck(); this.m_VisualizeBounds = ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.visualizeBounds, this.m_VisualizeBounds); if (EditorGUI.EndChangeCheck()) { EditorPrefs.SetBool("VisualizeBounds", this.m_VisualizeBounds); } CollisionModuleUI.s_LastInteractedEditor = this; ModuleUI.GUIMinMaxCurve(CollisionModuleUI.s_Texts.dampen, this.m_Dampen); ModuleUI.GUIMinMaxCurve(CollisionModuleUI.s_Texts.bounce, this.m_Bounce); ModuleUI.GUIMinMaxCurve(CollisionModuleUI.s_Texts.lifetimeLoss, this.m_LifetimeLossOnCollision); double num1 = (double)ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.minKillSpeed, this.m_MinKillSpeed); if (collisionTypes != CollisionModuleUI.CollisionTypes.World || collisionModes == CollisionModuleUI.CollisionModes.Mode2D) { double num2 = (double)ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.radiusScale, this.m_RadiusScale); } if (collisionTypes == CollisionModuleUI.CollisionTypes.World) { ModuleUI.GUILayerMask(CollisionModuleUI.s_Texts.collidesWith, this.m_CollidesWith); ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.collidesWithDynamic, this.m_CollidesWithDynamic); if (collisionModes == CollisionModuleUI.CollisionModes.Mode3D) { ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.interiorCollisions, this.m_InteriorCollisions); } ModuleUI.GUIInt(CollisionModuleUI.s_Texts.maxCollisionShapes, this.m_MaxCollisionShapes); ModuleUI.GUIPopup(CollisionModuleUI.s_Texts.quality, this.m_Quality, CollisionModuleUI.s_Texts.qualitySettings); if (this.m_Quality.intValue > 0) { double num3 = (double)ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.voxelSize, this.m_VoxelSize); } } ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.collisionMessages, this.m_CollisionMessages); }
private static ModuleUI[] CreateUIModules(ParticleSystemUI e, SerializedObject so) { int num1 = 0; ModuleUI[] moduleUiArray = new ModuleUI[18]; int index1 = 0; ParticleSystemUI owner1 = e; SerializedObject o1 = so; string[] moduleNames1 = ParticleSystemUI.s_ModuleNames; int index2 = num1; int num2 = 1; int num3 = index2 + num2; string displayName1 = moduleNames1[index2]; InitialModuleUI initialModuleUi = new InitialModuleUI(owner1, o1, displayName1); moduleUiArray[index1] = (ModuleUI)initialModuleUi; int index3 = 1; ParticleSystemUI owner2 = e; SerializedObject o2 = so; string[] moduleNames2 = ParticleSystemUI.s_ModuleNames; int index4 = num3; int num4 = 1; int num5 = index4 + num4; string displayName2 = moduleNames2[index4]; EmissionModuleUI emissionModuleUi = new EmissionModuleUI(owner2, o2, displayName2); moduleUiArray[index3] = (ModuleUI)emissionModuleUi; int index5 = 2; ParticleSystemUI owner3 = e; SerializedObject o3 = so; string[] moduleNames3 = ParticleSystemUI.s_ModuleNames; int index6 = num5; int num6 = 1; int num7 = index6 + num6; string displayName3 = moduleNames3[index6]; ShapeModuleUI shapeModuleUi = new ShapeModuleUI(owner3, o3, displayName3); moduleUiArray[index5] = (ModuleUI)shapeModuleUi; int index7 = 3; ParticleSystemUI owner4 = e; SerializedObject o4 = so; string[] moduleNames4 = ParticleSystemUI.s_ModuleNames; int index8 = num7; int num8 = 1; int num9 = index8 + num8; string displayName4 = moduleNames4[index8]; VelocityModuleUI velocityModuleUi1 = new VelocityModuleUI(owner4, o4, displayName4); moduleUiArray[index7] = (ModuleUI)velocityModuleUi1; int index9 = 4; ParticleSystemUI owner5 = e; SerializedObject o5 = so; string[] moduleNames5 = ParticleSystemUI.s_ModuleNames; int index10 = num9; int num10 = 1; int num11 = index10 + num10; string displayName5 = moduleNames5[index10]; ClampVelocityModuleUI velocityModuleUi2 = new ClampVelocityModuleUI(owner5, o5, displayName5); moduleUiArray[index9] = (ModuleUI)velocityModuleUi2; int index11 = 5; ParticleSystemUI owner6 = e; SerializedObject o6 = so; string[] moduleNames6 = ParticleSystemUI.s_ModuleNames; int index12 = num11; int num12 = 1; int num13 = index12 + num12; string displayName6 = moduleNames6[index12]; InheritVelocityModuleUI velocityModuleUi3 = new InheritVelocityModuleUI(owner6, o6, displayName6); moduleUiArray[index11] = (ModuleUI)velocityModuleUi3; int index13 = 6; ParticleSystemUI owner7 = e; SerializedObject o7 = so; string[] moduleNames7 = ParticleSystemUI.s_ModuleNames; int index14 = num13; int num14 = 1; int num15 = index14 + num14; string displayName7 = moduleNames7[index14]; ForceModuleUI forceModuleUi = new ForceModuleUI(owner7, o7, displayName7); moduleUiArray[index13] = (ModuleUI)forceModuleUi; int index15 = 7; ParticleSystemUI owner8 = e; SerializedObject o8 = so; string[] moduleNames8 = ParticleSystemUI.s_ModuleNames; int index16 = num15; int num16 = 1; int num17 = index16 + num16; string displayName8 = moduleNames8[index16]; ColorModuleUI colorModuleUi = new ColorModuleUI(owner8, o8, displayName8); moduleUiArray[index15] = (ModuleUI)colorModuleUi; int index17 = 8; ParticleSystemUI owner9 = e; SerializedObject o9 = so; string[] moduleNames9 = ParticleSystemUI.s_ModuleNames; int index18 = num17; int num18 = 1; int num19 = index18 + num18; string displayName9 = moduleNames9[index18]; ColorByVelocityModuleUI velocityModuleUi4 = new ColorByVelocityModuleUI(owner9, o9, displayName9); moduleUiArray[index17] = (ModuleUI)velocityModuleUi4; int index19 = 9; ParticleSystemUI owner10 = e; SerializedObject o10 = so; string[] moduleNames10 = ParticleSystemUI.s_ModuleNames; int index20 = num19; int num20 = 1; int num21 = index20 + num20; string displayName10 = moduleNames10[index20]; SizeModuleUI sizeModuleUi = new SizeModuleUI(owner10, o10, displayName10); moduleUiArray[index19] = (ModuleUI)sizeModuleUi; int index21 = 10; ParticleSystemUI owner11 = e; SerializedObject o11 = so; string[] moduleNames11 = ParticleSystemUI.s_ModuleNames; int index22 = num21; int num22 = 1; int num23 = index22 + num22; string displayName11 = moduleNames11[index22]; SizeByVelocityModuleUI velocityModuleUi5 = new SizeByVelocityModuleUI(owner11, o11, displayName11); moduleUiArray[index21] = (ModuleUI)velocityModuleUi5; int index23 = 11; ParticleSystemUI owner12 = e; SerializedObject o12 = so; string[] moduleNames12 = ParticleSystemUI.s_ModuleNames; int index24 = num23; int num24 = 1; int num25 = index24 + num24; string displayName12 = moduleNames12[index24]; RotationModuleUI rotationModuleUi = new RotationModuleUI(owner12, o12, displayName12); moduleUiArray[index23] = (ModuleUI)rotationModuleUi; int index25 = 12; ParticleSystemUI owner13 = e; SerializedObject o13 = so; string[] moduleNames13 = ParticleSystemUI.s_ModuleNames; int index26 = num25; int num26 = 1; int num27 = index26 + num26; string displayName13 = moduleNames13[index26]; RotationByVelocityModuleUI velocityModuleUi6 = new RotationByVelocityModuleUI(owner13, o13, displayName13); moduleUiArray[index25] = (ModuleUI)velocityModuleUi6; int index27 = 13; ParticleSystemUI owner14 = e; SerializedObject o14 = so; string[] moduleNames14 = ParticleSystemUI.s_ModuleNames; int index28 = num27; int num28 = 1; int num29 = index28 + num28; string displayName14 = moduleNames14[index28]; ExternalForcesModuleUI externalForcesModuleUi = new ExternalForcesModuleUI(owner14, o14, displayName14); moduleUiArray[index27] = (ModuleUI)externalForcesModuleUi; int index29 = 14; ParticleSystemUI owner15 = e; SerializedObject o15 = so; string[] moduleNames15 = ParticleSystemUI.s_ModuleNames; int index30 = num29; int num30 = 1; int num31 = index30 + num30; string displayName15 = moduleNames15[index30]; CollisionModuleUI collisionModuleUi = new CollisionModuleUI(owner15, o15, displayName15); moduleUiArray[index29] = (ModuleUI)collisionModuleUi; int index31 = 15; ParticleSystemUI owner16 = e; SerializedObject o16 = so; string[] moduleNames16 = ParticleSystemUI.s_ModuleNames; int index32 = num31; int num32 = 1; int num33 = index32 + num32; string displayName16 = moduleNames16[index32]; SubModuleUI subModuleUi = new SubModuleUI(owner16, o16, displayName16); moduleUiArray[index31] = (ModuleUI)subModuleUi; int index33 = 16; ParticleSystemUI owner17 = e; SerializedObject o17 = so; string[] moduleNames17 = ParticleSystemUI.s_ModuleNames; int index34 = num33; int num34 = 1; int num35 = index34 + num34; string displayName17 = moduleNames17[index34]; UVModuleUI uvModuleUi = new UVModuleUI(owner17, o17, displayName17); moduleUiArray[index33] = (ModuleUI)uvModuleUi; return(moduleUiArray); }
public override void OnInspectorGUI(ParticleSystem s) { if (CollisionModuleUI.s_Texts == null) CollisionModuleUI.s_Texts = new CollisionModuleUI.Texts(); string[] options = new string[2]{ "Planes", "World" }; CollisionModuleUI.CollisionTypes collisionTypes = (CollisionModuleUI.CollisionTypes) ModuleUI.GUIPopup(string.Empty, this.m_Type, options); CollisionModuleUI.CollisionModes collisionModes = CollisionModuleUI.CollisionModes.Mode3D; if (collisionTypes == CollisionModuleUI.CollisionTypes.Plane) { this.DoListOfPlanesGUI(); EditorGUI.BeginChangeCheck(); this.m_PlaneVisualizationType = (CollisionModuleUI.PlaneVizType) ModuleUI.GUIPopup(CollisionModuleUI.s_Texts.visualization, (int) this.m_PlaneVisualizationType, this.m_PlaneVizTypeNames); if (EditorGUI.EndChangeCheck()) { EditorPrefs.SetInt("PlaneColisionVizType", (int) this.m_PlaneVisualizationType); if (this.m_PlaneVisualizationType == CollisionModuleUI.PlaneVizType.Solid) this.SyncVisualization(); else ParticleEffectUtils.ClearPlanes(); } EditorGUI.BeginChangeCheck(); this.m_ScaleGrid = ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.scalePlane, this.m_ScaleGrid, "f2"); if (EditorGUI.EndChangeCheck()) { this.m_ScaleGrid = Mathf.Max(0.0f, this.m_ScaleGrid); EditorPrefs.SetFloat("ScalePlaneColision", this.m_ScaleGrid); this.SyncVisualization(); } } else collisionModes = (CollisionModuleUI.CollisionModes) ModuleUI.GUIPopup(CollisionModuleUI.s_Texts.collisionMode, this.m_CollisionMode, new string[2]{ "3D", "2D" }); EditorGUI.BeginChangeCheck(); this.m_VisualizeBounds = ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.visualizeBounds, this.m_VisualizeBounds); if (EditorGUI.EndChangeCheck()) EditorPrefs.SetBool("VisualizeBounds", this.m_VisualizeBounds); CollisionModuleUI.s_LastInteractedEditor = this; ModuleUI.GUIMinMaxCurve(CollisionModuleUI.s_Texts.dampen, this.m_Dampen); ModuleUI.GUIMinMaxCurve(CollisionModuleUI.s_Texts.bounce, this.m_Bounce); ModuleUI.GUIMinMaxCurve(CollisionModuleUI.s_Texts.lifetimeLoss, this.m_LifetimeLossOnCollision); double num1 = (double) ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.minKillSpeed, this.m_MinKillSpeed); if (collisionTypes != CollisionModuleUI.CollisionTypes.World || collisionModes == CollisionModuleUI.CollisionModes.Mode2D) { double num2 = (double) ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.radiusScale, this.m_RadiusScale); } if (collisionTypes == CollisionModuleUI.CollisionTypes.World) { ModuleUI.GUILayerMask(CollisionModuleUI.s_Texts.collidesWith, this.m_CollidesWith); ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.collidesWithDynamic, this.m_CollidesWithDynamic); if (collisionModes == CollisionModuleUI.CollisionModes.Mode3D) ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.interiorCollisions, this.m_InteriorCollisions); ModuleUI.GUIInt(CollisionModuleUI.s_Texts.maxCollisionShapes, this.m_MaxCollisionShapes); ModuleUI.GUIPopup(CollisionModuleUI.s_Texts.quality, this.m_Quality, CollisionModuleUI.s_Texts.qualitySettings); if (this.m_Quality.intValue > 0) { double num3 = (double) ModuleUI.GUIFloat(CollisionModuleUI.s_Texts.voxelSize, this.m_VoxelSize); } } ModuleUI.GUIToggle(CollisionModuleUI.s_Texts.collisionMessages, this.m_CollisionMessages); }