protected void InitializeLocator(IRectangleLocator locator)
 {
     if (locator != null && locator.Sprite == null)
     {
         locator.Sprite = this.Sprite;
     }
 }
Beispiel #2
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator,
                            WalkDirection direction, IPointLocator startPoint)
 {
     this.RectangleLocator      = rectangleLocator;
     this.AlignmentPointLocator = alignmentPointLocator;
     this.WalkDirection         = direction;
     this.StartPointLocator     = startPoint;
 }
Beispiel #3
0
        public override void Start()
        {
            this.originalBounds = this.Sprite.Bounds;

            if (this.From == null)
            {
                this.From = new FixedRectangleLocator(this.Sprite.Bounds);
            }
            if (this.To == null)
            {
                this.To = new FixedRectangleLocator(this.Sprite.Bounds);
            }

            this.InitializeLocator(this.From);
            this.InitializeLocator(this.To);
        }
 public RectangleWalker(IRectangleLocator rectangleLocator)
     : this(rectangleLocator, WalkDirection.Clockwise) {
 }
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical)
     : this(locator, horizontal, vertical, Point.Empty) {
 }
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical, Point offset) {
     this.RectangleLocator = locator;
     this.PointProportions = new SizeF(horizontal, vertical);
     this.Offset = offset;
 }
Beispiel #7
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl, WalkDirection direction)
 {
     return(new RectangleWalkEffect(rl, null, direction));
 }
Beispiel #8
0
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner, Point offset)
 {
     this.RectangleLocator = locator;
     this.PointProportions = this.ConvertCornerToProportion(corner);
     this.Offset           = offset;
 }
Beispiel #9
0
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical)
     : this(locator, horizontal, vertical, Point.Empty)
 {
 }
Beispiel #10
0
 public static BoundsEffect Bounds(IRectangleLocator from, IRectangleLocator to)
 {
     return(new BoundsEffect(from, to));
 }
 public static BoundsEffect Bounds(IRectangleLocator from, IRectangleLocator to) {
     return new BoundsEffect(from, to);
 }
 public static RectangleWalkEffect Walk(IRectangleLocator rl, WalkDirection direction) {
     return new RectangleWalkEffect(rl, null, direction);
 }
Beispiel #13
0
 public BoundsEffect(IRectangleLocator from, IRectangleLocator to)
 {
     this.From = from;
     this.To   = to;
 }
        public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction)
            : this(rectangleLocator, direction, null) {

        }
Beispiel #15
0
 public BoundsEffect(IRectangleLocator to)
 {
     this.To = to;
 }
Beispiel #16
0
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction, IPointLocator startPointLocator)
 {
     this.RectangleLocator  = rectangleLocator;
     this.Direction         = direction;
     this.StartPointLocator = startPointLocator;
 }
Beispiel #17
0
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction)
     : this(rectangleLocator, direction, null)
 {
 }
Beispiel #18
0
 public RectangleWalker(IRectangleLocator rectangleLocator)
     : this(rectangleLocator, WalkDirection.Clockwise)
 {
 }
Beispiel #19
0
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical, Point offset)
 {
     this.RectangleLocator = locator;
     this.PointProportions = new SizeF(horizontal, vertical);
     this.Offset           = offset;
 }
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction, IPointLocator startPointLocator) {
     this.RectangleLocator = rectangleLocator;
     this.Direction = direction;
     this.StartPointLocator = startPointLocator;
 }
Beispiel #21
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator)
     : this(rectangleLocator, null)
 {
 }
 public static RectangleWalkEffect Walk(IRectangleLocator rl) {
     return new RectangleWalkEffect(rl);
 }
Beispiel #23
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator)
     : this(rectangleLocator, alignmentPointLocator, WalkDirection.Clockwise, null)
 {
 }
 public static RectangleWalkEffect Walk(IRectangleLocator rl, Corner start, WalkDirection direction) {
     return new RectangleWalkEffect(rl, null, direction, new PointOnRectangleLocator(rl, start));
 }
Beispiel #25
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator,
                            WalkDirection direction)
     : this(rectangleLocator, alignmentPointLocator, direction, null)
 {
 }
 protected void InitializeLocator(IRectangleLocator locator) {
     if (locator != null && locator.Sprite == null)
         locator.Sprite = this.Sprite;
 }
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner)
     : this(locator, corner, Point.Empty) {
 }
Beispiel #28
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl)
 {
     return(new RectangleWalkEffect(rl));
 }
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner, Point offset) {
     this.RectangleLocator = locator;
     this.PointProportions = this.ConvertCornerToProportion(corner);
     this.Offset = offset;
 }
Beispiel #30
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl, Corner start, WalkDirection direction)
 {
     return(new RectangleWalkEffect(rl, null, direction, new PointOnRectangleLocator(rl, start)));
 }
Beispiel #31
0
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner)
     : this(locator, corner, Point.Empty)
 {
 }