#include <Animation.h>
Inheritance diagram for Animation:
Public Methods | |
void | draw (const Point &anchor) |
Draws the current position of the character in the animation. | |
void | update (float dt) |
Updates the animation to the next frame and keeps track of when the animation should have ended. | |
int | getNumTextures () |
Returns the nubmer of textures in the animation. | |
AnimationFrames * | getAnimationFrames () |
Returns the current animation frames. | |
void | setAnimationFrames (AnimationFrames *frames) |
Sets the current animation frames. | |
float | getAnimRuntime () |
Returns the runtime for the animation. | |
void | setAnimRuntime (float runtime) |
Sets the animation runtim. | |
void | setScaleFactor (float factor) |
Sets the scale factore of the sprite. | |
void | stop () |
Stops the animation, animStopped = true. | |
void | start () |
Starts the animation, animStopped = false. | |
void | setOffsets (int x, int y) |
Sets the offset of the image. | |
bool | isAnimStopped () |
Returns true if the animation has finished, used so explosion entities will be destroyed. | |
void | setUsingAlpha (bool alpha) |
Turns alpha blending on or off. | |
void | setAlphaBlendSpeed (float speed) |
1.0 would be the alpha goes from its starting value to 0 over the course of all the frames in the animation. | |
void | setStartAlphaValue (int a) |
Sets the starting value from alpha, it defaults to 255, which is no alpha, can be set to anything from 0 - 255. | |
void | setAlphaValue (int a) |
Sets an alpha value to apply to all frames of the animation. | |
void | setColor (int r, int g, int b) |
Sets the color to use when drawing the sprite. | |
Animation () | |
Super IsoBomb. | |
~Animation () | |
void | init () |
Inititalizes the animation object. | |
virtual void | OnLostDevice () |
Event called when device is lost. | |
virtual void | OnResetDevice () |
Event called when device is reset. |
The update function is used to keep the animation running at a constant speed no matter what the framerate is and it updates the current texture, which is then drawn in the draw method. Also implements the GameDXListener, which is used when switching modes, the device will be lost, and the OnLostDevice and OnREsetDevice handles those problems.
|
Super IsoBomb. Authors: Jim Clase, Jonathan Hilliker, Jason Winnebeck |
|
|
|
Draws the current position of the character in the animation.
|
|
Returns the current animation frames.
|
|
Returns the runtime for the animation.
|
|
Returns the nubmer of textures in the animation.
|
|
Inititalizes the animation object.
|
|
Returns true if the animation has finished, used so explosion entities will be destroyed.
|
|
Event called when device is lost.
Implements GameDXListener. |
|
Event called when device is reset.
Implements GameDXListener. |
|
1.0 would be the alpha goes from its starting value to 0 over the course of all the frames in the animation.
|
|
Sets an alpha value to apply to all frames of the animation.
|
|
Sets the current animation frames.
|
|
Sets the animation runtim.
|
|
Sets the color to use when drawing the sprite.
|
|
Sets the offset of the image.
|
|
Sets the scale factore of the sprite.
|
|
Sets the starting value from alpha, it defaults to 255, which is no alpha, can be set to anything from 0 - 255.
|
|
Turns alpha blending on or off.
|
|
Starts the animation, animStopped = false.
|
|
Stops the animation, animStopped = true.
|
|
Updates the animation to the next frame and keeps track of when the animation should have ended. Used the time since the last frame to know when to move onto the next frame based on the length of each frame.
|