Пример #1
0
        public override void Unload()
        {
            IL.Celeste.Level.Render           -= modLevelRender;
            On.Celeste.GameplayBuffers.Create -= onGameplayBuffersCreate;
            On.Celeste.GameplayBuffers.Unload -= onGameplayBuffersUnload;

            // dispose the blur temp buffer, or it will just be laying around for no reason.
            tempBuffer?.Dispose();
            tempBuffer = null;
        }
        public override void Unload()
        {
            IL.Celeste.Level.Render           -= modLevelRender;
            On.Celeste.Level.BeforeRender     -= onLevelBeforeRender;
            On.Celeste.GameplayBuffers.Create -= onGameplayBuffersCreate;
            On.Celeste.GameplayBuffers.Unload -= onGameplayBuffersUnload;

            // dispose the black mask, or it will just be laying around for no reason.
            blackMask?.Dispose();
            blackMask = null;
        }
Пример #3
0
        public override void Removed(Scene scene)
        {
            logBuffer?.Dispose();
            logBuffer = null;

            base.Removed(scene);
        }
        private void onGameplayBuffersUnload(On.Celeste.GameplayBuffers.orig_Unload orig)
        {
            orig();

            // dispose the black mask as well.
            foregroundEffectBuffer?.Dispose();
            foregroundEffectBuffer = null;
        }
Пример #5
0
 private void Dispose()
 {
     if (renderTarget != null)
     {
         renderTarget.Dispose();
     }
     renderTarget = null;
 }
Пример #6
0
        public void Dispose()
        {
            if (!allocated)
            {
                return;
            }
            allocated = false;

            HudTarget.Dispose();
            HudTarget = null;
        }
        public void Dispose()
        {
            if (starsTarget != null && !starsTarget.IsDisposed)
            {
                starsTarget.Dispose();
            }

            if (beamsTarget != null && !beamsTarget.IsDisposed)
            {
                beamsTarget.Dispose();
            }
            starsTarget = null;
            beamsTarget = null;
        }
Пример #8
0
        public override void End()
        {
            buffer.Dispose();
            Audio.BusStopAll(Buses.GAMEPLAY);
            Audio.Stop(bgSfx);
            if (snapshot != null)
            {
                Audio.EndSnapshot(snapshot);
            }
            snapshot = null;
            Stats.Store();

            base.End();
        }