public SpriteBatchHelper(GraphicsDevice device, Screen screen) { _spriteBatch = new SpriteBatch(device); _device = device; _screen = screen; _scale = new Vector2( (float)_device.Viewport.Width/(float)_screen.ScreenWidth, (float)_device.Viewport.Height/(float)_screen.ScreenHeight); }
/// <summary> /// LoadContent will be called once per game and is the place to load /// all of your content. /// </summary> protected override void LoadContent() { // Create a new SpriteBatch, which can be used to draw textures. _spriteBatch = new SpriteBatch(GraphicsDevice); _screens = new Dictionary<ScreenType, Screen> { { ScreenType.Intro, new IntroScreen() }, { ScreenType.XmasTree, new XmasTree() }, { ScreenType.Snowman, new XmasTree() }, { ScreenType.Fireplace, new XmasTree() }, { ScreenType.SantaClaus, new XmasTree() } }; _introScreen = _screens[ScreenType.XmasTree]; _activeScreen = _introScreen; foreach (var screen in _screens) { screen.Value.LoadContent(this); //if (screen.Value is Puzzle) // (_introScreen as IntroScreen).Puzzles.Add(screen.Value as Puzzle); } //(_introScreen as IntroScreen).LoadPuzzleButtons(); // TODO: use this.Content to load your game content here }