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(); }
// 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)); }
public static int GetActiveCount() { return(m_missiles.GetActiveCount()); }
public static int GetActiveCount() { return(m_hologramShips.GetActiveCount()); }
public static int GetActiveCount() { return(m_projectiles.GetActiveCount()); }
// 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()); }