TileAnimator::TileAnimator(TrackTile * tile) : QTimeLine(250) , m_tile(tile) { setFrameRange(0, FRAMES); connect(this, &TileAnimator::frameChanged, this, &TileAnimator::setTileRotation); }
void Sprite::setAnimation(string name) { auto seq = anims.find(name); if(seq == anims.end()) return; currentAnim = &seq->second; setFrameRange(currentAnim->frameStart, currentAnim->frameEnd); setLooped(currentAnim->loop); animState = AnimState::STOPPED; }
RenderThread::RenderThread(QObject *parent) : QThread(parent), renderprocess(NULL) { // Set options to defaults in case they are somehow not set earlier setFormat(); setFrameRange(); setSwitches(); // This is so that the render process actually starts in a new thread instead of 'run()' connect(this, SIGNAL(cli(QString,QStringList)), this, SLOT(executeRenderCommand(QString,QStringList))); }