Yet another version! While playing with square Sprites without transparency I found problems with fragments of the edges of Sprites being left behind. The problems were masked in the Demo because the edges of the Sprites there are mainly transparent and the displacements on each tick were only a few pixels. These are mainly solved (I hope!) but a GameWindow method is now provided to erase a Sprite from its' current position in cases where it might be necessary.
To provide more control over a Sprites' animation a Sprite now has a FrameCount property to get the number of frames in the animation and a boolean FrameForwards property to get or set the direction of animation. Previously the direction could be set by the SetFrameDirection method but could not be read back.
To allow the animation to be changed a Sprite now has LoadBitmap and LoadFile methods. The parameters for these are the same as for New2 and New3.
GameWindow now has an EraseSprite(index) method for use when manipulating a Sprite in some way might leave fragments of it visible. This might be before changing the animation to a smaller set of bitmaps or before moving a Sprite by changing its' X or Y properties.
__________________
Sorry, but I don't answer questions by PM or email.
Please post your queries in the forum.
Last edited by agraham : 07-03-2009 at 06:03 PM.
|