geAnim2D
From GriffinEngine
Animated 2D sprite. This class is album identical to geSprite2D with the only difference being an addition of a geAnimation object that updates the sprite. To control the playback of the animation, manipulate the geAnimation object itself.
Contents
[hide]Usage
Inheritance
Base classes
- geObject
- geObject2D
- geSprite2D
- geAnim2D
- geSprite2D
- geObject2D
Reference
Fields
Note: All coordinates are in pixels, relative to top-left corner of the window. All angles are in degrees.
- ↖
double x; // x coordinate (px)
- ↖
double y; // y coordinate (px)
- ↖
double r; // rotation (degrees) - around axis point
- ↖
double s; // scale - around axis point
- ↖
double w; // width (px)
- ↖
double h; // height (px)
- ↖
double alignX; // horizontal alignment offset - use Align() to set these
- ↖
double alignY; // vertical alignment offset
- ↖
double axisX; // horizontal axis offset - use SetAxis() to set these
- ↖
double axisY; // vertical axis offset
- ↖
bool active; // indicates whether object should be active/visible
- ↖
geSprite* sprite; // currently displayed sprite
geAnimation* anim; // animation
Constructors
geAnim2D( double _x=0, double _y=0, double _w=0, double _h=0, geAnimation* _anim=NULL );
geAnim2D( const geAnim2D& original ); // copy constructor
Methods
- ↖
virtual void Align( int alignment = GE_ALIGN_TL, double _alignX = 0, double _alignY = 0 );
- ↖
virtual void SetAxis( int axis = GE_ALIGN_CENTER, double _axisX = 0, double _axisY = 0 );
HUD |
---|
geHUD |
geAnim2D · geButton · geCircle · geObject2D · geSprite2D · geText2D |