Class hierarchy   Compound list   File list   Compound Members  

AnimatedSprite Class Reference

AnimatedSprite is the link between a sprite and an Object2D. More...

Inherits Object2D.

List of all members.

Public Members


Detailed Description

AnimatedSprite is the link between a sprite and an Object2D.

It associates single/multiple sprites to a world object, and is the basis for actual 'sprite' objects in games.


Member Function Documentation

AnimatedSprite::AnimatedSprite()

Construct an AnimatedSprite.

Parameters are identical to the ones constructing an Object2D

virtual long AnimatedSprite::advance(float Fraction) [virtual]

Object Move/State Change.

Defaults to switching between sprites to perform animation.

void AnimatedSprite::stopAnimation(int ConstantSprite=0)

Stop animating between sprites, and set the object to one constant sprite.

Default to the first sprite.

void AnimatedSprite::startAnimation(float Rate=1.0f)

Start animation between sprite frames.

This is useful to restart the animation after it was stopped.

void AnimatedSprite::addAnimationFrame(Sprite* S, float FrameLength)

Add another sprite to the animation sequence.

The frame length is in miliseconds.


The documentation for this class was generated from the following file: