예제 #1
0
        public static void UnloadData()
        {
            // all lights should be deallocated at this point
            MyCommonDebugUtils.AssertDebug(m_preallocatedLights.GetActiveCount() == 0, "MyLights.UnloadData: preallocated lights not emptied!");
            m_preallocatedLights.DeallocateAll();
            if (m_sortedLights != null)
            {
                m_sortedLights.Clear();
                m_sortedLights = null;
            }

            m_tree.Clear();
        }
예제 #2
0
 //  This method tells us if this buffer is almost consumed, so few more allocations and it's done.
 //  In that case, level needs to be reinicialized by server.
 public static bool IsAlmostFull()
 {
     //return m_nextForAllocation >= (m_capacity * 0.9);
     return(m_preallocatedContents.GetActiveCount() > (m_preallocatedContents.GetCapacity() * 0.9));
 }
예제 #3
0
 public static int GetActiveCount()
 {
     return(m_missiles.GetActiveCount());
 }
예제 #4
0
 public static int GetActiveCount()
 {
     return(m_hologramShips.GetActiveCount());
 }
예제 #5
0
 public static int GetActiveCount()
 {
     return(m_projectiles.GetActiveCount());
 }
예제 #6
0
 //  Checks if buffer has enough free triangles for adding new decal. If not, we can't add triangles
 //  of the decal (because we add all decal triangles or none)
 public bool CanAddTriangles(int newTrianglesCount)
 {
     //  If buffer is full, we can't add new triangles
     return((m_triangles.GetActiveCount() + newTrianglesCount) < m_triangles.GetCapacity());
 }