Z
Introduction
Code Example
// First we'll make a wide sprite:
Sprite sprite = SpriteManager.AddSprite("redball.bmp");
sprite.Width = 100;
sprite.Height = 20;
// And it will have a Z value of 0 (which is the default)
sprite.Z = 0;
// Now let's make another Sprite in front of the first Sprite:
Sprite spriteInFront = SpriteManager.AddSprite("redball.bmp");
spriteInFront.Width = 20;
spriteInFront.Height = 100;
// and it will ahve a Z value of 1, which will put it in front:
spriteInFront.Z = 1;Z in 2D
Default values
Z and Sorting
Last updated
Was this helpful?