Пример #1
0
 protected void InitializeLocator(IRectangleLocator locator)
 {
     if (locator != null && locator.Sprite == null)
     {
         locator.Sprite = this.Sprite;
     }
 }
Пример #2
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator,
                            WalkDirection direction, IPointLocator startPoint)
 {
     this.RectangleLocator      = rectangleLocator;
     this.AlignmentPointLocator = alignmentPointLocator;
     this.WalkDirection         = direction;
     this.StartPointLocator     = startPoint;
 }
Пример #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);
        }
Пример #4
0
 public RectangleWalker(IRectangleLocator rectangleLocator)
     : this(rectangleLocator, WalkDirection.Clockwise) {
 }
Пример #5
0
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical)
     : this(locator, horizontal, vertical, Point.Empty) {
 }
Пример #6
0
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical, Point offset) {
     this.RectangleLocator = locator;
     this.PointProportions = new SizeF(horizontal, vertical);
     this.Offset = offset;
 }
Пример #7
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl, WalkDirection direction)
 {
     return(new RectangleWalkEffect(rl, null, direction));
 }
Пример #8
0
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner, Point offset)
 {
     this.RectangleLocator = locator;
     this.PointProportions = this.ConvertCornerToProportion(corner);
     this.Offset           = offset;
 }
Пример #9
0
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical)
     : this(locator, horizontal, vertical, Point.Empty)
 {
 }
Пример #10
0
 public static BoundsEffect Bounds(IRectangleLocator from, IRectangleLocator to)
 {
     return(new BoundsEffect(from, to));
 }
Пример #11
0
 public static BoundsEffect Bounds(IRectangleLocator from, IRectangleLocator to) {
     return new BoundsEffect(from, to);
 }
Пример #12
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl, WalkDirection direction) {
     return new RectangleWalkEffect(rl, null, direction);
 }
Пример #13
0
 public BoundsEffect(IRectangleLocator from, IRectangleLocator to)
 {
     this.From = from;
     this.To   = to;
 }
Пример #14
0
        public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction)
            : this(rectangleLocator, direction, null) {

        }
Пример #15
0
 public BoundsEffect(IRectangleLocator to)
 {
     this.To = to;
 }
Пример #16
0
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction, IPointLocator startPointLocator)
 {
     this.RectangleLocator  = rectangleLocator;
     this.Direction         = direction;
     this.StartPointLocator = startPointLocator;
 }
Пример #17
0
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction)
     : this(rectangleLocator, direction, null)
 {
 }
Пример #18
0
 public RectangleWalker(IRectangleLocator rectangleLocator)
     : this(rectangleLocator, WalkDirection.Clockwise)
 {
 }
Пример #19
0
 public PointOnRectangleLocator(IRectangleLocator locator, float horizontal, float vertical, Point offset)
 {
     this.RectangleLocator = locator;
     this.PointProportions = new SizeF(horizontal, vertical);
     this.Offset           = offset;
 }
Пример #20
0
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction, IPointLocator startPointLocator) {
     this.RectangleLocator = rectangleLocator;
     this.Direction = direction;
     this.StartPointLocator = startPointLocator;
 }
Пример #21
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator)
     : this(rectangleLocator, null)
 {
 }
Пример #22
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl) {
     return new RectangleWalkEffect(rl);
 }
Пример #23
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator)
     : this(rectangleLocator, alignmentPointLocator, WalkDirection.Clockwise, null)
 {
 }
Пример #24
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl, Corner start, WalkDirection direction) {
     return new RectangleWalkEffect(rl, null, direction, new PointOnRectangleLocator(rl, start));
 }
Пример #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;
 }
Пример #27
0
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner)
     : this(locator, corner, Point.Empty) {
 }
Пример #28
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl)
 {
     return(new RectangleWalkEffect(rl));
 }
Пример #29
0
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner, Point offset) {
     this.RectangleLocator = locator;
     this.PointProportions = this.ConvertCornerToProportion(corner);
     this.Offset = offset;
 }
Пример #30
0
 public static RectangleWalkEffect Walk(IRectangleLocator rl, Corner start, WalkDirection direction)
 {
     return(new RectangleWalkEffect(rl, null, direction, new PointOnRectangleLocator(rl, start)));
 }
Пример #31
0
 public PointOnRectangleLocator(IRectangleLocator locator, Corner corner)
     : this(locator, corner, Point.Empty)
 {
 }