Adding support for z-index for sprites