Oxygine  1
2g game engine
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
oxygine::TweenAnim Class Reference

#include <TweenAnim.h>

Public Types

typedef Sprite type
 

Public Member Functions

 TweenAnim (const ResAnim *resAnim, int row=0)
 
 TweenAnim (const ResAnim *resAnim, int startFrame, int endFrame)
 
void init (Sprite &actor)
 
void done (Sprite &actor)
 
const ResAnimgetResAnim () const
 
int getRow () const
 
int getStart () const
 
int getEnd () const
 
void setResAnim (const ResAnim *resAnim)
 
void setInterval (int start, int end)
 
void update (Sprite &actor, float p, const UpdateState &us)
 

Protected Member Functions

virtual void _setAnimFrame (Sprite &, const AnimationFrame &)
 

Protected Attributes

const ResAnim_resAnim
 
int _row
 
int _start
 
int _end
 

Detailed Description

A TweenAnim class use for playing per frame animation

spSprite sprite = new Sprite();
sprite->addTween(TweenAnim(res.getResAnim("anim")), 500, -1);

Constructor & Destructor Documentation

◆ TweenAnim() [1/2]

oxygine::TweenAnim::TweenAnim ( const ResAnim resAnim,
int  row = 0 
)

Row/Column mode. Plays single row. if resanim == 0 will be used current

◆ TweenAnim() [2/2]

oxygine::TweenAnim::TweenAnim ( const ResAnim resAnim,
int  startFrame,
int  endFrame 
)

Frames mode. Play animation in interval [start, end]

Member Function Documentation

◆ setInterval()

void oxygine::TweenAnim::setInterval ( int  start,
int  end 
)

Play animation in interval [start, end]

◆ setResAnim()

void oxygine::TweenAnim::setResAnim ( const ResAnim resAnim)

Changes ResAnim


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