private static void onLevelEnd(On.Celeste.Level.orig_End orig, Level self) { orig(self); // we're leaving the level: forget about the stored speed berry. storedSpeedBerry = null; }
private static void onLevelEnd(On.Celeste.Level.orig_End orig, Celeste.Level self) { // we're quitting the level, so we need to get rid of all of its entities. foreach (Entity entity in self.Entities) { queueReferenceToEntity(entity); } orig(self); if (nluaReferenceMap != null && nluaReferenceMap.TryGetValue(self, out int levelRef)) { // it seems NLua can't dispose entities by itself, so we need to help it a bit. Logger.Log("ExtendedVariantMode/LeakPreventionHack", $"Cleaning up reference of NLua to {self.GetType().FullName} {levelRef}"); nluaCollectObject.Invoke(nluaObjectTranslator, new object[] { levelRef }); } // now we can terminate all queued objects. cleanUpReferencesToQueuedObjects(); }
private void onLevelEnd(On.Celeste.Level.orig_End orig, Level self) { orig(self); onLevelEnd(); }
// ================ Stamp on Chapter Complete screen ================ private void onLevelEnd(On.Celeste.Level.orig_End orig, Level self) { isLevelEnding = true; orig(self); isLevelEnding = false; }