Example #1
0
    private IEnumerator AORoutine()
    {
        int index = 0;

        while (true)
        {
            yield return(null);

            if (!Singleton <QualitySettingsRunner> .Instance.HighDetails.Value)
            {
                continue;
            }
            int numUpdates = Mathf.Min(m_meshes.Count, GetAORefereshRate());
            int num        = 0;
            while (num < numUpdates)
            {
                if (index >= m_meshes.Count)
                {
                    index = 0;
                }
                MeshVertexAO meshVertexAO = m_meshes[index];
                meshVertexAO.UpdateAO(instant: false);
                num++;
                index++;
            }
        }
    }
Example #2
0
 public void Unregister(MeshVertexAO mesh)
 {
     m_meshes.Remove(mesh);
 }
Example #3
0
 public void Register(MeshVertexAO mesh)
 {
     m_meshes.Add(mesh);
 }