Exemplo n.º 1
0
void Sprite::addFrame(frame_t newFrame)
{
  setTotalFrames(m_frames+1);
  for (frame_t i=m_frames-1; i>=newFrame; --i)
    setFrameDuration(i, frameDuration(i-1));

  folder()->displaceFrames(newFrame, +1);
}
Exemplo n.º 2
0
void Sprite::removeFrame(frame_t frame)
{
  folder()->displaceFrames(frame, -1);

  frame_t newTotal = m_frames-1;
  for (frame_t i=frame; i<newTotal; ++i)
    setFrameDuration(i, frameDuration(i+1));
  setTotalFrames(newTotal);
}
Exemplo n.º 3
0
//==============================================================
//  Получение продолжительности
//==============================================================
double SettingAnimation::duration() const
{
    return frameDuration() * frameCount_;
}