Monday, February 1, 2010

Sprite class v3

The sprite class now has a scaling effect. Testing all effects together I have the sprite fading from 50 alpha to 255 alpha over 2 seconds, at the same time it is rotating counterclockwise by 180 degrees over 2 seconds. While both of those are happening it is also scaling to 3x the original size over 2 seconds.

This is the code being used to test the effects together:
test = new Sprite(Content.Load("Sprites\\Statues"));
test.position = new Vector2(50.0f, 50.0f);
test.setTransparency(50);
test.beginFadeEffect(255.0f, 2000.0f);
test.beginRotationEffect(MathHelper.ToRadians(-180.0f), 2000.0f);
test.beginScalingEffect(3.0f, 2000.0f);



Here is a link to the sprite class:
http://mage360.pastebin.com/f427b2e0b

No comments:

Post a Comment