2D Toolkit Forum

2D Toolkit => Support => Topic started by: Velvety on August 18, 2013, 11:26:29 pm

Title: How to set draw/render layer of sprites?
Post by: Velvety on August 18, 2013, 11:26:29 pm
Hi,

I've recently started using 2DToolkit.  I am converting an older code base of mine that used Sprite Manager 2.  I'm trying to figure out how to render sprites ontop/behind each other with 2DToolkit without manually setting the z position of the sprite transforms.  SM2 had a "drawlayer" property to handle this on its sprites.  I see in your script reference that the tk2dSprite class is supposed to have a RenderLayer property that sounds like it would do the same thing.  However, this property does not actually exist in that class when I look.  How come it is missing?  Is there some other way to handle the order that sprites are rendered in?

Thanks, really liking 2DToolkit so far.
Title: Re: How to set draw/render layer of sprites?
Post by: unikronsoftware on August 18, 2013, 11:40:21 pm
The RenderLayer property is only in 2D Toolkit 2.2 beta - you must've seen the RenderLayer property there? You can get beta 1 from the forum.
Title: Re: How to set draw/render layer of sprites?
Post by: Velvety on August 19, 2013, 12:33:38 am
Ah that makes sense.  I have been reading the v2.2 documentation here (http://www.unikronsoftware.com/2dtoolkit/docs/2.20/html/classtk2d_sprite.html) because I just bought 2DToolkit and assumed it was the most recent one in the docs (I actually have v2.1).

I will checkout the v2.2 beta now, thanks!

Are there any known issues with the beta?

Title: Re: How to set draw/render layer of sprites?
Post by: unikronsoftware on August 19, 2013, 09:59:57 am
I'm not aware of any major issues. The beta adds new features, and fixes some bugs in older ones so its probably safe to use.