当前位置: 首页>>代码示例>>C++>>正文


C++ Tween::setRepeat方法代码示例

本文整理汇总了C++中Tween::setRepeat方法的典型用法代码示例。如果您正苦于以下问题:C++ Tween::setRepeat方法的具体用法?C++ Tween::setRepeat怎么用?C++ Tween::setRepeat使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Tween的用法示例。


在下文中一共展示了Tween::setRepeat方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: ofAddListener

///--------------------------------------------------------------
void Scene2::updateEnter()
{
    leaveSceneTimer.reset();
    leaveSceneTimer.setup(SettingsManager::getInstance().sceneIdleTimeToArtists * 1000);
    ofAddListener(leaveSceneTimer.TIMER_COMPLETE , this, &Scene2::leaveSceneTimerCompleteHandler);
    leaveSceneTimer.start(false);

    currentClipIndex = (artistIndex * artistOffset) + (artistOffset/2) + SettingsManager::getInstance().abletonFirstClipIndex;

    ofAddListener(TUIOHandler::getInstance().eventTouchDown, this, &Scene2::tuioPressed);
    ofAddListener(TUIOHandler::getInstance().eventTouchUp, this, &Scene2::tuioReleased);
    ofAddListener(TUIOHandler::getInstance().eventTouchDrag, this, &Scene2::tuioDragged);

    ofAddListener(TUIOHandler::getInstance().eventTouchDownCursor, this, &Scene2::tuioReceiverPressed);
    ofAddListener(TUIOHandler::getInstance().eventTouchUpCursor, this, &Scene2::tuioReceiverReleased);
    ofAddListener(TUIOHandler::getInstance().eventTouchDragCursor, this, &Scene2::tuioReceiverDragged);

    // Request tempo in order to set it on objects
    ofAddListener(AbletonManager::getInstance().eventTempoChanged, this, &Scene2::tempoChanged);
    AbletonManager::getInstance().requestTempo();
    AbletonManager::getInstance().requestVolumeUpdates();
    AbletonManager::getInstance().requestGridUpdates();

    switch(backgroundMode)
    {
        case SceneBgModeVideo:
        {
            videoPlayer.play();
            break;
        }
        case SceneBgModeImages:
        {
            float delay = 0.0f;
            float duration = 8.0f;
            float minScale = 1.0f;
            float maxScale = 1.02f;
            Tweenzor::add(&bgImageScale, minScale, maxScale, delay, duration, EASE_IN_OUT_SINE);
            Tween *tweenScale = Tweenzor::getTween(&bgImageScale);
            tweenScale->setRepeat(-1, true);
            float minAlpha = 255.0f;
            float maxAlpha = 0.0f;
            duration *= 0.7f;
            Tweenzor::add(&bgImageAlpha, minAlpha, maxAlpha, delay, duration, EASE_IN_OUT_SINE);
            Tween *tweenAlpha = Tweenzor::getTween(&bgImageAlpha);
            tweenAlpha->setRepeat(-1, true);

            break;
        }
        case SceneBgModeNone:
        default:
            break;
    }

    for (unsigned int i=0; i< numObjects; ++i)
        objects[i]->setup();

    AbletonManager::getInstance().playScene(currentClipIndex);

    BaseScene::updateEnter();
}
开发者ID:miquelsoler,项目名称:ConductrEnter,代码行数:61,代码来源:Scene2.cpp


注:本文中的Tween::setRepeat方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。