0 - stopped
1,2,3 - one, two, three times... */
void start_animation(int loops);
+ /* Stop animation */
+ void stop_animation()
+ { start_animation(0); }
/** Check if animation is stopped or not */
bool check_animation();
/** Reverse the animation */
- void reverse_animation();
+ void reverse_animation(bool reverse);
float get_fps()
{ return action->fps; }
{ return (int)frame; }
/** Set current frame */
void set_frame(int frame_)
- { frame = frame_; }
+ { if(frame_ > get_frames()) frame = 0; else frame = frame_; }
Surface* get_frame(unsigned int frame)
{
if(frame < action->surfaces.size())
Actions actions;
Action* action;
+ std::string next_action;
};
} //namespace SuperTux