public EngineCommandResult Execute(IEngineCommand c) { CoreAPI.I.Game.Level.Entities .Where(e => e.HasComponent(ComponentType.Geom)) .Select(e => e.Get <GeomComponent>(ComponentType.Geom).Mesh) .ForEach(m => m.Free()); var result = LevelCommandsHelper.CollectResources(); var aliveMeshes = Mesh.HoldingData.Count(h => h.IsAlive); var aliveMeshesData = BufferDataDesctiption.HoldingData.Count(h => h.IsAlive); Engine.I.Log.Info($"Alive meshes: {aliveMeshes}, Alive meshes data: {aliveMeshesData}"); return(result); }
public EngineCommandResult Execute(IEngineCommand c) { return(LevelCommandsHelper.CollectResources()); }