UnityEditor.ParticleEffectUI.HandleKeyboardShortcuts C# (CSharp) Method

HandleKeyboardShortcuts() private method

private HandleKeyboardShortcuts ( ParticleSystem root ) : void
root UnityEngine.ParticleSystem
return void
        private void HandleKeyboardShortcuts(ParticleSystem root)
        {
            Event current = Event.current;
            if (current.type == EventType.KeyDown)
            {
                int num = 0;
                if (current.keyCode == kPlay.keyCode)
                {
                    if (EditorApplication.isPlaying)
                    {
                        this.Stop();
                        this.Play();
                    }
                    else if (!ParticleSystemEditorUtils.editorIsPlaying)
                    {
                        this.Play();
                    }
                    else
                    {
                        this.Pause();
                    }
                    current.Use();
                }
                else if (current.keyCode == kStop.keyCode)
                {
                    this.Stop();
                    current.Use();
                }
                else if (current.keyCode == kReverse.keyCode)
                {
                    num = -1;
                }
                else if (current.keyCode == kForward.keyCode)
                {
                    num = 1;
                }
                if (num != 0)
                {
                    ParticleSystemEditorUtils.editorIsScrubbing = true;
                    float editorSimulationSpeed = ParticleSystemEditorUtils.editorSimulationSpeed;
                    float num3 = ((!current.shift ? 1f : 3f) * this.m_TimeHelper.deltaTime) * ((num <= 0) ? -3f : 3f);
                    ParticleSystemEditorUtils.editorPlaybackTime = Mathf.Max((float) 0f, (float) (ParticleSystemEditorUtils.editorPlaybackTime + (num3 * editorSimulationSpeed)));
                    if (root.isStopped)
                    {
                        root.Play();
                        root.Pause();
                    }
                    ParticleSystemEditorUtils.PerformCompleteResimulation();
                    current.Use();
                }
            }
            if ((current.type == EventType.KeyUp) && ((current.keyCode == kReverse.keyCode) || (current.keyCode == kForward.keyCode)))
            {
                ParticleSystemEditorUtils.editorIsScrubbing = false;
            }
        }