/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { Input = InputIterator(); SpriteLoader.Init(GraphicsDevice); Scheduler.Init(); Card.Init(); Drawable.Init(); GameOverType.Init(); Template.Init(); RenderTarget2D pixel = new RenderTarget2D(GraphicsDevice, 1, 1); GraphicsDevice.SetRenderTarget(pixel); GraphicsDevice.Clear(Color.White); GraphicsDevice.SetRenderTarget(null); Pixel = pixel; Noise = GenerateNoiseTexture(GraphicsDevice, 256, 256, new Random()); LoadFont(); if (!OptionsFile.Exists) { OptionsFile.Flush(); } else { OptionsFile.Reload(); } Scene = new SceneMascot(this); base.Initialize(); }
public static void Init(GraphicsDevice device) { Instance = new SpriteLoader(device); }