Transforming 2D sprite
k I got my Sprite class done its working with a small moving tile,
my concern here: how is a transform from sprite to sprite implemented?
- I know a timer is used for animation, but do I Create another sprite that alpha blends in as the other goes out? that's my main guess.
or is there another function provided by D3DX?
using DirectX 9 with visual studio 2008
Your sprite has a texture attached to it. You can pick a small part of the texture to be drawn on the screen. So if you put all the animationframes in 1 texture you can make a loop which picks a part of the texture to be drawn every time.
With the timer you can set the animation speed. (when the frame changes to the next)
With the timer you can set the animation speed. (when the frame changes to the next)
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement