Beispiel #1
0
 public void AddLODItem(ILODItem lodItem)
 {
     if (m_LODItemInstanceIDs.Add(lodItem.GetInstanceID()))
     {
         m_LODs.Add(new LODBehaviour(lodItem));
     }
 }
Beispiel #2
0
        public void RemoveLODItem(ILODItem lodItem)
        {
            int instanceID = lodItem.GetInstanceID();

            if (m_LODItemInstanceIDs.Remove(instanceID))
            {
                for (int iLOD = 0; iLOD < m_LODs.Count; iLOD++)
                {
                    if (m_LODs[iLOD].Instance.GetInstanceID() == instanceID)
                    {
                        m_LODs.RemoveAt(iLOD);
                        break;
                    }
                }
            }
        }