Hello Guest

Author Topic: Repeat sprite  (Read 4626 times)

mike2d

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 63
    • View Profile
Repeat sprite
« on: June 27, 2012, 09:09:13 am »
hi there,

what's the best way to achieve the following :

i'd like to make a pipes set. i've started to draw a small portion of it. my idea is to repeat this portion to create long pipes.

any idea ?

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Repeat sprite
« Reply #1 on: June 27, 2012, 01:41:43 pm »
There isn't a built in tiling sprite, but you can simply spawn multiple sprites at the correct spacing. You can get the spacing by looking at the bounds - tk2dSprite.GetUntrimmedBounds returns this information.

mike2d

  • 2D Toolkit
  • Jr. Member
  • *
  • Posts: 63
    • View Profile
Re: Repeat sprite
« Reply #2 on: June 27, 2012, 02:29:40 pm »
actually, in the meantime, i discovered your Tile Map tool and that's just what i was looking for :)