From a8bc5d5b58720d0ab81e6ff7a621007605e6060f Mon Sep 17 00:00:00 2001 From: MrScautHD <65916181+MrScautHD@users.noreply.github.com> Date: Sat, 19 Aug 2023 22:29:06 +0200 Subject: [PATCH] Removed HasInitialized and use instead IsReady --- Raylib-cs/types/Window.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Raylib-cs/types/Window.cs b/Raylib-cs/types/Window.cs index 26a71f5..dbf8ddb 100644 --- a/Raylib-cs/types/Window.cs +++ b/Raylib-cs/types/Window.cs @@ -10,8 +10,6 @@ public class Window : IDisposable private readonly int _height; private readonly string _title; - public static bool HasInitialized { get; private set; } - public Window(int width, int height, string title) { this._width = width; @@ -24,8 +22,10 @@ public class Window : IDisposable /// public void Init() { - if (!HasInitialized) + if (!IsReady()) + { Raylib.InitWindow(this._width, this._height, this._title); + } } /// See @@ -165,9 +165,7 @@ public class Window : IDisposable public void Dispose() { - if (!HasInitialized) return; - + if (!IsReady()) return; this.Close(); - HasInitialized = false; } } \ No newline at end of file