View Single Post
Old 06-20-2008, 12:39 PM   #11 (permalink)
DiNoGames
zB Programmer
Jr. Member
 
DiNoGames's Avatar
 
Join Date: May 2008
Location: Bremen, germany
Posts: 454
Reputation: 246
Send a message via Skype™ to DiNoGames
Default

Hi Jack,

this is not the way to do it... infact, it does not make any sense in this context. With sprites.Add you add a new "object" to the game like the devil in the sample. But this will not animate it. You need to load all animation images into a list and then extend the sprite class (or better create a new class with sprite as base class). The extension is to increase a value that says which animationframe is the one to be shown now. Then check the last animation frame with the current and if its not the same (texture has changed) then set the Texture of the sprite to the current animation frame texture in the list.

The described doing is very easy to implement (at least I think so ). I have already done this for the maze game I am making.
__________________

To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 0 or greater. You currently have 0 posts.







DiNoGames is offline   Reply With Quote