Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 public ShapeSlot(Rectangle rectangle)
 {
     _rectangle = rectangle;
     _shapeViewDrawable = new ShapeViewDrawable(ShapeColor.None, ShapeType.None);
     Texture = Globals.Content.Load<Texture2D>("shapeSlotFrame");
 }