예제 #1
0
        protected GameElementRenderer(GraphicsDeviceManager gdManager, ISquareDrawable drawedObject, Point mapDimension, SpriteBatch sBatch)
        {
            this.RenderedObject = drawedObject;
            this.GdManager      = gdManager;
            this.SpriteBatch    = sBatch;
            this.MapDimension   = mapDimension;

            //texture is one pixel with specified color
            this.Texture = new Texture2D(gdManager.GraphicsDevice, 1, 1);
            this.Texture.SetData(new[] { this.RenderedObject.GetColor() });
        }
예제 #2
0
 public FieldRenderer(GraphicsDeviceManager gdManager, ISquareDrawable drawedObject, Point mapDimension, SpriteBatch sBatch)
     : base(gdManager, drawedObject, mapDimension, sBatch)
 {
 }