protected void InitializeLocator(IPointLocator locator) { if (locator != null && locator.Sprite == null) { locator.Sprite = this.Sprite; } }
public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator, WalkDirection direction, IPointLocator startPoint) { this.RectangleLocator = rectangleLocator; this.AlignmentPointLocator = alignmentPointLocator; this.WalkDirection = direction; this.StartPointLocator = startPoint; }
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); }
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; }
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; }
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; }
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; }
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; }
public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator, WalkDirection direction) : this(rectangleLocator, alignmentPointLocator, direction, null) { }
public RectangleWalkEffect(IRectangleLocator rectangleLocator, IPointLocator alignmentPointLocator) : this(rectangleLocator, alignmentPointLocator, WalkDirection.Clockwise, null) { }
public GotoEffect(IPointLocator to) : base(to) { }
public DifferenceLocator(IPointLocator locator1, IPointLocator locator2) : this(locator1, locator2, Point.Empty) { }
public MoveEffect(IPointLocator to) { this.To = to; }
protected void InitializeLocator(IPointLocator locator) { if (locator != null && locator.Sprite == null) locator.Sprite = this.Sprite; }