UnityEditor.EmissionModuleUI.DoBurstGUI C# (CSharp) Method

DoBurstGUI() private method

private DoBurstGUI ( ParticleSystem s ) : void
s UnityEngine.ParticleSystem
return void
        private void DoBurstGUI(ParticleSystem s)
        {
            EditorGUILayout.Space();
            Rect controlRect = ModuleUI.GetControlRect(13, new GUILayoutOption[0]);
            GUI.Label(controlRect, s_Texts.burst, ParticleSystemStyles.Get().label);
            float dragWidth = 20f;
            float num2 = 40f;
            float width = (((num2 + dragWidth) * 3f) + dragWidth) - 1f;
            float a = controlRect.width - width;
            a = Mathf.Min(a, EditorGUIUtility.labelWidth);
            int intValue = this.m_BurstCount.intValue;
            Rect position = new Rect(controlRect.x + a, controlRect.y, width, 3f);
            GUI.Label(position, GUIContent.none, ParticleSystemStyles.Get().line);
            Rect rect3 = new Rect((controlRect.x + dragWidth) + a, controlRect.y, num2 + dragWidth, controlRect.height);
            GUI.Label(rect3, "Time", ParticleSystemStyles.Get().label);
            rect3.x += dragWidth + num2;
            GUI.Label(rect3, "Min", ParticleSystemStyles.Get().label);
            rect3.x += dragWidth + num2;
            GUI.Label(rect3, "Max", ParticleSystemStyles.Get().label);
            position.y += 12f;
            GUI.Label(position, GUIContent.none, ParticleSystemStyles.Get().line);
            float duration = s.main.duration;
            int num7 = intValue;
            for (int i = 0; i < intValue; i++)
            {
                SerializedProperty floatProp = this.m_BurstTime[i];
                SerializedProperty property2 = this.m_BurstParticleMinCount[i];
                SerializedProperty property3 = this.m_BurstParticleMaxCount[i];
                controlRect = ModuleUI.GetControlRect(13, new GUILayoutOption[0]);
                rect3 = new Rect(controlRect.x + a, controlRect.y, dragWidth + num2, controlRect.height);
                float num9 = ModuleUI.FloatDraggable(rect3, floatProp, 1f, dragWidth, "n2");
                if (num9 < 0f)
                {
                    floatProp.floatValue = 0f;
                }
                if (num9 > duration)
                {
                    floatProp.floatValue = duration;
                }
                int num10 = property2.intValue;
                int num11 = property3.intValue;
                rect3.x += rect3.width;
                property2.intValue = ModuleUI.IntDraggable(rect3, null, num10, dragWidth);
                rect3.x += rect3.width;
                property3.intValue = ModuleUI.IntDraggable(rect3, null, num11, dragWidth);
                if (i == (intValue - 1))
                {
                    rect3.x = position.xMax - 12f;
                    if (ModuleUI.MinusButton(rect3))
                    {
                        intValue--;
                    }
                }
            }
            if (intValue < 4)
            {
                rect3 = ModuleUI.GetControlRect(13, new GUILayoutOption[0]);
                rect3.xMin = rect3.xMax - 12f;
                if (ModuleUI.PlusButton(rect3))
                {
                    intValue++;
                }
            }
            if (intValue != num7)
            {
                this.m_BurstCount.intValue = intValue;
            }
        }