public void AssignShape(IShapeView shapeView) { if (shapeView is ShapeViewDrawable) { _shapeViewDrawable = (ShapeViewDrawable) shapeView; } else { _shapeViewDrawable = new ShapeViewDrawable(shapeView); } if (shapeView.RecentlyCreated) { _shapeViewDrawable.Rectangle = new Rectangle(Rectangle.X, _shapeViewDrawable.Rectangle.Y, _shapeViewDrawable.Rectangle.Width, _shapeViewDrawable.Rectangle.Height); } }
public ShapeSlot(Rectangle rectangle) { _rectangle = rectangle; _shapeViewDrawable = new ShapeViewDrawable(ShapeColor.None, ShapeType.None); Texture = Globals.Content.Load<Texture2D>("shapeSlotFrame"); }