/// <summary> /// Init the game engine. This should be the first thing to call in /// the LoadContent method. /// </summary> /// <param name="_game"></param> public static void Init(Game _game, int _renderWith, int _renderHeight, bool _useScanlines) { game = _game; RenderWidth = _renderWith; RenderHeight = _renderHeight; UseScanlines = _useScanlines; random = new Random(DateTime.Now.TimeOfDay.Milliseconds); input = new Input(); soundEffectCache = new List <SoundEffect>(); texture2DCache = new List <Texture2D>(); shaderCache = new List <Effect>(); bitmapFontCache = new List <BitmapFont>(); SpriteBatch = new SpriteBatch(game.GraphicsDevice); SceneManager = new SceneManager(game); SaveDataManager = new SaveDataManager(); SosEngine.Core.ModPlayer = new SosEngine.ModPlayer(); SpriteFrameCache = new SpriteFrameCache(); drawing2D = new Drawing2D(game.GraphicsDevice); Mouse.WindowHandle = game.Window.Handle; game.IsMouseVisible = Debug; logHistory = new List <string>(); }
/// <summary> /// Call this in the UnloadContent method. /// </summary> public static void Shutdown() { SosEngine.Core.ModPlayer.Dispose(); SosEngine.Core.ModPlayer = null; input.Dispose(); }