コード例 #1
0
ファイル: EditorUI.cs プロジェクト: Hengle/foundationEditor
 public void windowRepaint()
 {
     if (window != null)
     {
         window.Repaint();
     }
 }
コード例 #2
0
 public void update(float t)
 {
     if (this.m_AvatarPreview == null || !this.m_Clip)
     {
         return;
     }
     parentEditorWindow.Repaint();
 }
コード例 #3
0
        private void update(float deltaTime)
        {
            if (parentEditorWindow != null)
            {
                parentEditorWindow.Repaint();
            }

            if (Application.isPlaying)
            {
                return;
            }
            if (particleSystems == null || go == null)
            {
                Stop();
                return;
            }


            _runningTime += deltaTime;
            foreach (ParticleSystem particleSystem in particleSystems)
            {
                if (particleSystem == null || particleSystem.gameObject == null)
                {
                    continue;
                }

                if (Mathf.Approximately(this.m_LastTime, -1f) || !Mathf.Approximately(this.m_LastTime, _runningTime))
                {
                    float num2 = Time.fixedDeltaTime * 0.5f;
                    float t    = _runningTime;
                    float num4 = t - this.m_LastTime;
                    if ((((t < this.m_LastTime) || (t < num2)) || (Mathf.Approximately(this.m_LastTime, -1f) || (num4 > particleSystem.main.duration))) || !Mathf.Approximately(this.m_LastPsTime, particleSystem.time))
                    {
                        particleSystem.Simulate(0f, true, true);
                        particleSystem.Simulate(t, true, false);
                    }
                    else
                    {
                        float num5 = t % particleSystem.main.duration;
                        float num6 = num5 - particleSystem.time;
                        if (num6 < -num2)
                        {
                            num6 = (num5 + particleSystem.main.duration) - particleSystem.time;
                        }
                        particleSystem.Simulate(num6, true, false);
                    }
                    this.m_LastPsTime = particleSystem.time;
                    this.m_LastTime   = _runningTime;
                }
            }
        }