private void DoInitialize() { AssertNotDisposed(); SDL2_Platform.BeforeInitialize(); RaiseAction(Initialize); }
public Game(string title, int width, int height) { SDL2_Platform.Init(this, title, width, height); Instance = this; AppDomain.CurrentDomain.UnhandledException += OnUnhandledException; // TODO: Audio //AudioDevice.Initialize(); // Ready to run the loop! RunApplication = true; }
protected void Dispose(bool disposing) { if (!_isDisposed) { if (disposing) { // TODO: Audio //AudioDevice.Dispose(); SDL2_Platform.Dispose(this); SDL2_MouseUtil.WindowHandle = IntPtr.Zero; } _isDisposed = true; } }
public void Run() { AssertNotDisposed(); if (!_initialized) { DoInitialize(); _initialized = true; } BeginRun(); _gameTimer = Stopwatch.StartNew(); SDL2_Platform.RunLoop(this); EndRun(); }