From a9b3b53ce967833d2cf16fe88d08b8976289c100 Mon Sep 17 00:00:00 2001 From: cosmonaut Date: Thu, 23 Jun 2022 23:59:23 -0700 Subject: [PATCH] add optional Destroy method to Game --- src/Game.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Game.cs b/src/Game.cs index e2f7bb7..acc1f17 100644 --- a/src/Game.cs +++ b/src/Game.cs @@ -94,6 +94,8 @@ namespace MoonWorks Tick(); } + Destroy(); + AudioDevice.Dispose(); GraphicsDevice.Dispose(); Window.Dispose(); @@ -103,6 +105,7 @@ namespace MoonWorks protected abstract void Update(TimeSpan delta); protected abstract void Draw(double alpha); + protected virtual void Destroy() {} // Called when a file is dropped on the game window. protected virtual void DropFile(string filePath) {}