[XNA] Z-order of 2D Sprites? [SOLVED]

Started by
1 comment, last by flashinpan 15 years, 5 months ago
XNA 3.0 If I have a bunch of 2D sprites that overlap, how do I control the order in which they overlap? Please provide sample source code. [Edited by - Tom Knowlton on November 15, 2008 11:07:48 AM]
Advertisement
You control the sorting by specifying one of the values of SpriteSortMode when calling SpriteBatch.Begin. You can have it either sort in front-to-back or back-to-front order.

Quote:Original post by MJP
You control the sorting by specifying one of the values of SpriteSortMode when calling SpriteBatch.Begin. You can have it either sort in front-to-back or back-to-front order.


Thank you.

This topic is closed to new replies.

Advertisement