private void resetSphereAfterTime(float delay) { getGVRContext().getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { answerState = SphereStaticList.RESTORING; restoreSpherePosition(1.2f); restoreTexture(); } }, delay); }
private void animateScale() { for (int i = 0; i < NUMBER_OF_WAVES; i++) { final int iterator = i; getGVRContext().getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { mScaleAnimation[iterator] = new GVRScaleAnimation(mMicRunItens[iterator], ANIMATION_TIME, 1); mScaleAnimation[iterator].setRepeatMode(GVRRepeatMode.REPEATED); mScaleAnimation[iterator].setRepeatCount(-1); mScaleAnimation[iterator].setInterpolator(new InterpolatorExpoEaseOut()); mScaleAnimation[iterator].start(getGVRContext().getAnimationEngine()); } }, DELAY_TIME * i); } } }
public void show() { if (!MenuFrame.isOpen) { getGVRContext().getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { setInitialPosition(); } }, 2.5f); } else { setInitialPosition(); } }
@Override public void onKeyConfirm() { dashboard.hide(); lastSelectedSphereFlag.giveAnswer(answer.getCurrentText()); answer.cleanText(); mGVRContext.getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { animateSpheresBlurState(0); } }, 3f); }
private void animPlaying() { removeChildObject(playButton); removeChildObject(cleanButton); getGVRContext().getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { addChildObject(playButton); addChildObject(cleanButton); ScaleWorm.animPlaying = false; getTransform().setPositionY(calculateNewYPosition()); } }, getMajorDelayAnim()); }
public void animateArrowOn() { if (finishAnimationOn && !lockOff) { if (opacityAnimationOn != null) { getGVRContext().getAnimationEngine().stop(opacityAnimationOn); } else { opacityAnimationOn = new GVROpacityAnimation(this, 1f, 1); } executeAnimationOn(); } else { lockOff = true; lastSwip = System.currentTimeMillis(); getGVRContext().getPeriodicEngine().runAfter(getRunnableOff(), TIME_TO_OFF +0.1f); } }
private void animateOpacityOff() { for (int i = 0; i < NUMBER_OF_WAVES; i++) { mMicRunItens[i].getTransform().setScale(0, 0, 0); mMicRunItens[i].getRenderData().getMaterial().setOpacity(0); final int iterator = i; getGVRContext().getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { mOpacityAnimation[iterator] = new GVROpacityAnimation(mMicRunItens[iterator], ANIMATION_TIME, 0); mOpacityAnimation[iterator].setInterpolator(new InterpolatorExpoEaseOut()); mOpacityAnimation[iterator].setRepeatMode(GVRRepeatMode.ONCE); mOpacityAnimation[iterator].setRepeatCount(1); mOpacityAnimation[iterator].start(getGVRContext().getAnimationEngine()); } }, DELAY_TIME * i); } }
private void animateOpacityOn() { for (int i = 0; i < NUMBER_OF_WAVES; i++) { mMicRunItens[i].getTransform().setScale(0, 0, 0); mMicRunItens[i].getRenderData().getMaterial().setOpacity(0); final int iterator = i; getGVRContext().getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { mOpacityAnimation[iterator] = new GVROpacityAnimation(mMicRunItens[iterator], ANIMATION_TIME, 1); mOpacityAnimation[iterator].setInterpolator(new InterpolatorExpoEaseOut()); mOpacityAnimation[iterator].setRepeatMode(GVRRepeatMode.REPEATED); mOpacityAnimation[iterator].setRepeatCount(-1); mOpacityAnimation[iterator].start(getGVRContext().getAnimationEngine()); } }, DELAY_TIME * i); } }
public void show() { AnimateScale(1); AnimateOpacity(1); getGVRContext().getPeriodicEngine().runAfter(new Runnable() { @Override public void run() { hide(); } }, 2.0f); AudioClip.getInstance(getGVRContext().getContext()).playSound(AudioClip.getExceptionSoundID(), 1.0f, 1.0f); }
getGVRContext().getAnimationEngine().stop(scaleThisAnimation); getGVRContext().getPeriodicEngine().runAfter(new Runnable() {