Source

HI-2DRTSSGMDDPP1 / GameProgram / GameProgram / GraphicsSceneFactory.cs

Full commit
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace GameProgram
{
  public class GraphicsSceneFactory
  {
    private GraphicsItemFactory graphicsItemFactory = new GraphicsItemFactory();

    //public GraphicsItemFactory GraphicsItemFactory
    //{
    //  get
    //  {
    //    throw new System.NotImplementedException();
    //  }
    //  set
    //  {
    //  }
    //}

    //public void createGraphicsScene()
    //{
    //  throw new System.NotImplementedException();
    //}

    internal GraphicsScene createGraphicsScene( SpriteBatch spriteBatch, List<VisableGameEntity> visibleGameEntities )
    {
      GraphicsScene newGraphicsScene = new GraphicsScene( spriteBatch );
      GraphicsItem newGraphicsItem;

      foreach( VisableGameEntity visableGameEntity in visibleGameEntities )
      {
        newGraphicsItem = graphicsItemFactory.createGraphicsItem( spriteBatch, visableGameEntity );

        newGraphicsScene.Add( newGraphicsItem );
        
      }

      return newGraphicsScene;
    }
  }
}