mirror of
https://github.com/Facepunch/sbox-public.git
synced 2025-12-23 22:48:07 -05:00
Implement Game.IsClosing (#3538)
This commit is contained in:
@@ -70,9 +70,12 @@ public static partial class Game
|
||||
|
||||
internal static void Shutdown()
|
||||
{
|
||||
IsClosing = true;
|
||||
IsPlaying = false;
|
||||
|
||||
ActiveScene?.Destroy();
|
||||
ActiveScene = null;
|
||||
|
||||
IsClosing = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,6 +295,8 @@ public static class EditorScene
|
||||
|
||||
public static void Stop()
|
||||
{
|
||||
Game.IsClosing = true;
|
||||
|
||||
SceneEditorSession.Active.StopPlaying();
|
||||
|
||||
Game.IsPlaying = false;
|
||||
@@ -311,6 +313,8 @@ public static class EditorScene
|
||||
Game.ActiveScene = null;
|
||||
}
|
||||
|
||||
Game.IsClosing = false;
|
||||
|
||||
Sound.StopAll( 0.5f );
|
||||
|
||||
SceneEditorTick();
|
||||
|
||||
Reference in New Issue
Block a user