Posted: 26th Sep 2011 12:42
SetDepth didn't make any effect. why?
Posted: 27th Sep 2011 0:37
Are you talking about the SetSpriteDepth method ? If so always remember that your dealing with the Z-Order of sprites being drawn to the screen. Hope this helps.
Posted: 27th Sep 2011 1:00
"

Could you provide a bit more info please? You haven't really given us anything to go on.
Posted: 27th Sep 2011 5:12
cSprite m_pSky;
m_pSky.SetDepth(10);

my code is like this. and I didn't use SetSpriteDepth(), but a member function .SetDepth().
Posted: 27th Sep 2011 8:47
So does m_pSky.SetDepth(10); do the same thing as agk::SetSpriteDepth(), well is it supposed to? I'm going to assume it does for now.

So are you testing it against other sprites because the SetSpriteDepth command controlls the draw order of sprites?
Posted: 27th Sep 2011 9:04
I use the .draw function myself. is it the reason that .SetDepth don't make any effect?
If I don't use .draw by myself . which function should I use to show the sprite?
Posted: 27th Sep 2011 10:56
I use the .draw function myself. is it the reason that .SetDepth don't make any effect?

I don't know. I'm not familiar with the cSprite members. What you could try is programming it using the normal commands and then translating it to the cSprite members.

If I don't use .draw by myself . which function should I use to show the sprite?

When using the normal commands the sprites are automatically visible and so there isn't a command you need to call each loop to draw the sprites. If you create a sprite but don't use the .draw command is it still drawn each loop? Maybe you only need to call it once?

Actually I think the best thing to do would be to write a working demo using the normal commands and then try to replicate that using the cSprite class. You then atleast have something to compare it to. Sorry I can't be of more help.
Posted: 27th Sep 2011 11:00
To Hodgey,Thank u very much.
Now I wrap a class named CSprite with the normal commands.