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