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

            if (this.From == null)
            {
                this.From = new FixedPointLocator(this.Sprite.Location);
            }

            this.InitializeLocator(this.From);
            this.InitializeLocator(this.To);
        }
Example #4
0
        public override void Start()
        {
            base.Start();

            if (this.AlignmentPointLocator == null)
            {
                this.AlignmentPointLocator = Locators.SpriteBoundsPoint(Corner.MiddleCenter);
            }

            this.InitializeLocator(this.PointWalker);
            this.InitializeLocator(this.AlignmentPointLocator);

            this.spriteLocator        = new AlignedSpriteLocator(this.PointWalker, this.AlignmentPointLocator);
            this.spriteLocator.Sprite = this.Sprite;
        }
Example #5
0
        public override void Start()
        {
            base.Start();

            if (this.AlignmentPointLocator == null)
            {
                this.AlignmentPointLocator = Locators.SpriteBoundsPoint(Corner.MiddleCenter);
            }

            this.InitializeLocator(this.RectangleLocator);
            this.InitializeLocator(this.AlignmentPointLocator);
            this.InitializeLocator(this.StartPointLocator);

            IPointLocator startLocator = this.StartPointLocator ??
                                         Locators.At(this.RectangleLocator.GetRectangle().Location);

            this.walker        = new RectangleWalker(this.RectangleLocator, this.WalkDirection, startLocator);
            this.walker.Sprite = this.Sprite;

            this.spriteLocator        = new AlignedSpriteLocator(this.walker, this.AlignmentPointLocator);
            this.spriteLocator.Sprite = this.Sprite;
        }
Example #6
0
 public RectangleFromCornersLocator(IPointLocator topLeftLocator, IPointLocator bottomRightLocator, Point expand)
 {
     this.TopLeftLocator     = topLeftLocator;
     this.BottomRightLocator = bottomRightLocator;
     this.Expansion          = expand;
 }
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction, IPointLocator startPointLocator) {
     this.RectangleLocator = rectangleLocator;
     this.Direction = direction;
     this.StartPointLocator = startPointLocator;
 }
Example #8
0
 public RectangleFromCornersLocator(IPointLocator topLeftLocator, IPointLocator bottomRightLocator) :
     this(topLeftLocator, bottomRightLocator, Point.Empty)
 {
 }
 public AlignedSpriteLocator(IPointLocator referencePointLocator, IPointLocator spritePointLocator) :
     this(referencePointLocator, spritePointLocator, Point.Empty) {
 }
 public AlignedSpriteLocator(IPointLocator referencePointLocator, IPointLocator spritePointLocator, Point offset) {
     this.ReferencePointLocator = referencePointLocator;
     this.SpritePointLocator = spritePointLocator;
     this.Offset = offset;
 }
Example #11
0
 public MoveEffect(IPointLocator from, IPointLocator to)
 {
     this.From = from;
     this.To   = to;
 }
 public DifferenceLocator(IPointLocator locator1, IPointLocator locator2, Point offset) {
     this.Locator1 = locator1;
     this.Locator2 = locator2;
     this.Offset = offset;
 }
Example #13
0
 public DifferenceLocator(IPointLocator locator1, IPointLocator locator2, Point offset)
 {
     this.Locator1 = locator1;
     this.Locator2 = locator2;
     this.Offset   = offset;
 }
Example #14
0
 public AlignedSpriteLocator(IPointLocator referencePointLocator, IPointLocator spritePointLocator, Point offset)
 {
     this.ReferencePointLocator = referencePointLocator;
     this.SpritePointLocator    = spritePointLocator;
     this.Offset = offset;
 }
Example #15
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator,
                            WalkDirection direction)
     : this(rectangleLocator, alignmentPointLocator, direction, null)
 {
 }
 public RectangleFromCornersLocator(IPointLocator topLeftLocator, IPointLocator bottomRightLocator, Point expand) {
     this.TopLeftLocator = topLeftLocator;
     this.BottomRightLocator = bottomRightLocator;
     this.Expansion = expand;
 }
Example #17
0
 public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator)
     : this(rectangleLocator, alignmentPointLocator, WalkDirection.Clockwise, null)
 {
 }
Example #18
0
 public GotoEffect(IPointLocator to)
     : base(to)
 {
 }
Example #19
0
 public RectangleWalker(IRectangleLocator rectangleLocator, WalkDirection direction, IPointLocator startPointLocator)
 {
     this.RectangleLocator  = rectangleLocator;
     this.Direction         = direction;
     this.StartPointLocator = startPointLocator;
 }
Example #20
0
 public AlignedSpriteLocator(IPointLocator referencePointLocator, IPointLocator spritePointLocator) :
     this(referencePointLocator, spritePointLocator, Point.Empty)
 {
 }
 public DifferenceLocator(IPointLocator locator1, IPointLocator locator2) 
     : this(locator1, locator2, Point.Empty) {
 }
 public RectangleFromCornersLocator(IPointLocator topLeftLocator, IPointLocator bottomRightLocator) :
     this(topLeftLocator, bottomRightLocator, Point.Empty) {
 }
Example #23
0
 public MoveEffect(IPointLocator to)
 {
     this.To = to;
 }
 protected void InitializeLocator(IPointLocator locator) {
     if (locator != null && locator.Sprite == null)
         locator.Sprite = this.Sprite;
 }
Example #25
0
 public DifferenceLocator(IPointLocator locator1, IPointLocator locator2)
     : this(locator1, locator2, Point.Empty)
 {
 }