2D Toolkit Forum

2D Toolkit => Support => Topic started by: mike2d on June 27, 2012, 09:09:13 am

Title: Repeat sprite
Post by: mike2d 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 ?
Title: Re: Repeat sprite
Post by: unikronsoftware 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.
Title: Re: Repeat sprite
Post by: mike2d 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 :)