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() }); }
public FieldRenderer(GraphicsDeviceManager gdManager, ISquareDrawable drawedObject, Point mapDimension, SpriteBatch sBatch) : base(gdManager, drawedObject, mapDimension, sBatch) { }