source: 2011/23/sijoseha/Fera Proelia/Fera Proelia/Fera Proelia/ScreenManager.cs @ 2118

Revision 2118, 1.0 KB checked in by sijoseha, 10 years ago (diff)

Some modifications. Nothing is really happening yet.

Line 
1using System;
2using System.Collections.Generic;
3using Microsoft.Xna.Framework;
4using Microsoft.Xna.Framework.Content;
5using Microsoft.Xna.Framework.Graphics;
6
7namespace Fera_Proelia
8{
9    public class ScreenManager : DrawableGameComponent
10    {
11        List<GameScreen> screens = new List<GameScreen>();
12        List<GameScreen> screensToUpdate = new List<GameScreen>();
13
14        SpriteBatch spriteBatch;
15
16        bool isInitialized;
17
18        public SpriteBatch SpriteBatch { get { return spriteBatch; } }
19
20        public ScreenManager(Game game)
21            : base(game)
22        {
23        }
24
25        public override void Initialize()
26        {
27            base.Initialize();
28            isInitialized = true;
29        }
30
31        protected override void LoadContent()
32        {
33            ContentManager content = Game.Content;
34            spriteBatch = new SpriteBatch(GraphicsDevice);
35
36            foreach (GameScreen screen in screens)
37            {
38                screen.LoadContent();
39            }
40        }
41    }
42}
Note: See TracBrowser for help on using the repository browser.