public void Update() { pos += velocity; if (pos.X <= 0 - largestSpriteWidth) { pos = new Point(HUDConstants.hudWidth, pos.Y); banner.loopCount++; } if (pos.X >= HUDConstants.hudWidth + 10) { pos = new Point(HUDConstants.hudWidth, pos.Y); sprite = LinkSpriteFactory.Instance.CreateWalkingLeftLinkSprite(); velocity = new Point(-3, 0); banner.loopCount++; } sprite.Update(); }
public BannerLink(Banner banner, Point startingPos) { this.banner = banner; sprite = LinkSpriteFactory.Instance.CreateWalkingRightLinkSprite(); pos = startingPos; }