Пример #1
0
            void UpdateCurve(SwitchableCurve switchableCurve, Object data)
            {
                switch (m_DebugUI.m_CurrentMode)
                {
                case Modes.Efficiency:
                {
                    var   stat       = m_DebugUI.m_VFX.GetParticleSystemInfo(switchableCurve.id);
                    float efficiency = (float)stat.aliveCount / (float)stat.capacity;

                    m_CurveMat.SetFloat("_OrdinateScale", 1.0f);
                    switchableCurve.curve.AddPoint(efficiency);
                    m_DebugUI.UpdateSystemInfoEntry(switchableCurve.id, stat);
                }
                break;

                case Modes.Alive:
                {
                    var   stat     = m_DebugUI.m_VFX.GetParticleSystemInfo(switchableCurve.id);
                    float maxAlive = (float)data;

                    var superior2 = 1u << (int)Mathf.CeilToInt(Mathf.Log(maxAlive, 2.0f));
                    m_DebugUI.m_YaxisElts[1].text = (superior2 / 2).ToString();
                    m_DebugUI.m_YaxisElts[2].text = superior2.ToString();

                    m_CurveMat.SetFloat("_OrdinateScale", 1.0f / (float)superior2);
                    switchableCurve.curve.AddPoint(stat.aliveCount);
                    m_DebugUI.UpdateSystemInfoEntry(switchableCurve.id, stat);
                }
                break;

                default:
                    break;
                }
            }
Пример #2
0
 public void OnVFXChange()
 {
     if ((m_DebugUI.m_CurrentMode == Modes.Efficiency || m_DebugUI.m_CurrentMode == Modes.Alive) && m_DebugUI.m_VFX != null)
     {
         m_VFXCurves.Clear();
         m_TimeBarsOffsets.Clear();
         for (int i = 0; i < m_DebugUI.m_GpuSystems.Count(); ++i)
         {
             var toggle          = m_DebugUI.m_SystemInfos[m_DebugUI.m_GpuSystems[i]][1] as Toggle;
             var switchableCurve = new SwitchableCurve(m_DebugUI.m_GpuSystems[i], m_MaxPoints, toggle);
             m_VFXCurves.Add(switchableCurve);
         }
     }
 }