Friday, June 25, 2010

V1.3 Update

I've just finished the new and improved Animation class. It is a complete rewrite from the old one.

Now supports:
*2 Dimensional Sprite Sheets - NOTE: They have to be even, if you have a 5x5 sprite sheet it must have 25 frames i plan to change this in the future.
*Allows an array of integers to be passed that controls how long that particular frame will be displayed. If you have 5 frames the array would look like...
int[] times = new int[] { 10,20,50,1,100 };
This will be make the first frame last for 10 milliseconds, the 2nd for 20 and so forth. All times are measured in Milliseconds.
*Positions are based off of Origin, however you can choose to draw as if it were at the upper left corner of the frame.
*You can choose to play between 2 sets of frames, eg for an attack you could have the inital attack and then something else. E.G.. animation.Play(1,5,6,10); This will play frames 1- 5 ONCE then loop through frames 6 - 10 until it is stopped. I'm going to add a feature that lets you decide weather it will loop the 2nd time or just stop as well.

There are numerous other updates and I will be writing a documentation for it when I release it. All of the code is documented so it shouldn't be very hard to read. It is not perfect at the moment though, I will be working to make it more efficient as I work on this release and future releases.

Again if anyone has any ideas or requests of things they would like added to the library please Email me at AB4@comcast.net

Happy Coding

No comments:

Post a Comment