using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;
using WindowsGame1.Screen;

namespace WindowsGame1.Scene
{
    public abstract class GameScene : DrawableGameComponent
    {
        public string Name;
        public SpriteBatch Sprite;
        public List<ScreenBase> Screens;

        public GameScene(Game game, string name)
            : base(game)
        {
            Name = name;
            Screens = new List<ScreenBase>();
        }

        public override void Update(GameTime gameTime)
        {
            foreach (ScreenBase sb in Screens)
            {
                sb.Update(gameTime);
            }
            base.Update(gameTime);
        }

        public override void Draw(GameTime gameTime)
        {
            foreach (ScreenBase sb in Screens)
            {
                sb.Draw(gameTime, Sprite);
            }
            base.Draw(gameTime);
        }
    }
}
