public void stopFloatingSphere() { gvrContext.getAnimationEngine().stop(floatingAnimation); isFloatingSphere = false; }
private void stop(GVRAnimation animation) { if (animation != null) { this.getGVRContext().getAnimationEngine().stop(animation); } }
private void stop(GVRAnimation animation) { if (animation != null) { this.getGVRContext().getAnimationEngine().stop(animation); } }
private void stop(GVRAnimation opacityAnimation) { if (opacityAnimation != null) { this.getGVRContext().getAnimationEngine().stop(opacityAnimation); } }
private void stopAnimations() { if (scaleExpand != null) { this.getGVRContext().getAnimationEngine().stop(scaleExpand); } if (rmExpand != null) { this.getGVRContext().getAnimationEngine().stop(rmExpand); } if (scaleCollapse != null) { this.getGVRContext().getAnimationEngine().stop(scaleCollapse); } if (rmCollapse != null) { this.getGVRContext().getAnimationEngine().stop(rmCollapse); } }
public void changeInterpolatorTo(GVRInterpolator interpolator) { animationInterpolator = interpolator; getGVRContext().getAnimationEngine().stop(appleAnimation); startAppleAnimation(); }
public void animationsTime(){ getGVRContext().getAnimationEngine().stop(appleAnimation); startAppleAnimation(); } }
private void stopAnimation() { gvrContext.getAnimationEngine().stop(animation); AudioClip.getInstance(getGVRContext().getContext()) .pauseSound(streamID); animation = null; isPlayed = false; }
private void animateArrowOff() { if (opacityAnimationOff != null) { getGVRContext().getAnimationEngine().stop(opacityAnimationOff); } else { opacityAnimationOff = new GVROpacityAnimation(this, TIME_TO_OFF, 0); } opacityAnimationOff.start(getGVRContext().getAnimationEngine()); }
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); } }
public void hide() { apple.getTransform().setPositionY(APPLE_INITIAL_POSITION_Y); apple.getRenderData().getMaterial().setOpacity(0f); getGVRContext().getAnimationEngine().stop(appleAnimation); }
public void rotateAroundCamera(float duration, float degree) { if (wormParentAnimation != null) { getGVRContext().getAnimationEngine().stop(wormParentAnimation); } wormParentAnimation = new GVRRotationByAxisWithPivotAnimation( wormParent.getTransform(), duration, degree, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f) .start(getGVRContext().getAnimationEngine()); }
public void snapSphere(float[] hit) { if (isUnsnappingSphere) { gvrContext.getAnimationEngine().stop(snapAnimation); isUnsnappingSphere = false; } if(hit != null) snapAnimation = new GVRRelativeMotionAnimation(this, 1.2f, hit[0] - getTransform().getPositionX(), hit[1] - getTransform().getPositionY(), 0f).start(gvrContext.getAnimationEngine()); }
public void showEvent() { if (animOpacity != null) { this.getGVRContext().getAnimationEngine().stop(animOpacity); } animOpacity = new GVROpacityAnimation(buttonHover, 0.6f, 1); animOpacity.setRepeatMode(GVRRepeatMode.ONCE); animOpacity.setRepeatCount(1); animOpacity.setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation gvrAnimation) { buttonHover.getRenderData().getMaterial().setOpacity(0); } }); animOpacity.start(getGVRContext().getAnimationEngine()); } }
public void setSelectedAnimation(int index) { // No Animation if (index == 0) { if (currentAnimation != null) { context.getAnimationEngine().stop(currentAnimation); currentAnimation = null; } } else { index -= 1; if (currentDisplayedModel != null && currentDisplayedModel.getAnimation().getAnimationCount() > 0) currentAnimation = currentDisplayedModel.getAnimation().getAnimation(index); currentAnimation.setRepeatMode(GVRRepeatMode.REPEATED); currentAnimation.setRepeatCount(-1); currentAnimation.start(context.getAnimationEngine()); } }
public void unsnapSphere(float duration) { if (!isUnsnappingSphere) { if (snapAnimation != null) { gvrContext.getAnimationEngine().stop(snapAnimation); } isUnsnappingSphere = true; snapAnimation = new GVRRelativeMotionAnimation(this, duration, -getTransform() .getPositionX(), -getTransform().getPositionY(), 0f).start(gvrContext.getAnimationEngine()) .setInterpolator(new InterpolatorExpoEaseInOut()) .setOnFinish(new GVROnFinish() { @Override public void finished(GVRAnimation arg0) { isUnsnappingSphere = false; if (answerState == SphereStaticList.MOVEABLE) { animateFloating(); } } }); } }