private bool Diff() { foreach (var ent in MyEntities.GetEntities()) { if ((ent.PositionComp.GetPosition() - MySession.Static.ControlledEntity.Entity.PositionComp.GetPosition()).Length() > 100) { ent.Close(); } } return(true); if (!m_snapA.HasValue) { m_snapA = HkBaseSystem.GetMemorySnapshot(); } else { var snapB = HkBaseSystem.GetMemorySnapshot(); int a, b; HkMemorySnapshot.Diff(m_snapA.Value, snapB, out a, out b); //HkMemorySnapshot.Diff(m_snapA.Value, snapB); m_snapA.Value.RemoveReference(); m_snapA = null; snapB.RemoveReference(); m_memoryA = a; m_memoryB = b; } return(true); }
private bool Diff() { if (!m_snapA.HasValue) { m_snapA = HkBaseSystem.GetMemorySnapshot(); } else { var snapB = HkBaseSystem.GetMemorySnapshot(); int a, b; HkMemorySnapshot.Diff(m_snapA.Value, snapB, out a, out b); //HkMemorySnapshot.Diff(m_snapA.Value, snapB); m_snapA.Value.RemoveReference(); m_snapA = null; snapB.RemoveReference(); m_memoryA = a; m_memoryB = b; } return(true); }