private MoveContainer() { objects = new List<MoveableObject>(); removeStack = new List<MoveableObject>(); addStack = new List<MoveableObject>(); mv = new MoveVisitor(); isRunning = false; }
private MoveContainer() { objects = new List <MoveableObject>(); removeStack = new List <MoveableObject>(); addStack = new List <MoveableObject>(); mv = new MoveVisitor(); isRunning = false; }
public override void Move(MoveVisitor visitor) { visitor.Visit(this); //visitor.DifferenceInPosition = new Point(visitor.DifferenceInPosition.X / 2, visitor.DifferenceInPosition.Y / 2); foreach (ShapeComponent shape in Shapes) { shape.Move(visitor); } SetNewGeometry(); }
public override void Execute() { var moveVisitor = new MoveVisitor(offset); foreach (var shape in shapes) { // set the shape to his original position. //shape.Move(offset); //// update their origin position //shape.UpdateOriginTransform(); shape.Accept(moveVisitor); } // Deselect all the shapes, because we can only Select non selected shapes. shapes.ForEach(Selection.GetInstance().RemoveChild); // Select all these shapes. new SelectShapeCommand(shapes).Execute(); }
public abstract void Move(MoveVisitor visitor);
public void Accept(MoveVisitor mv, double delta) { mv.Visit(this, delta); }
public override void Move(MoveVisitor visitor) { visitor.Visit(this); ShapeComponent.Move(visitor); }
public void Undo() { MoveVisitor moveVisitor = new MoveVisitor(inverseVelocity); shape.Accept(moveVisitor); }
public void Do() { MoveVisitor moveVisitor = new MoveVisitor(velocity); shape.Accept(moveVisitor); }
public override void Move(MoveVisitor visitor) { visitor.Visit(this); }