本文整理汇总了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();
}