/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> /// <param name="updateState"></param> /// <param name="animationState"></param> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { if (_checkFunction()) { this.NotifyAnimationFinished(); } }
/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> /// <param name="updateState"></param> /// <param name="animationState"></param> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { //how does Slerp work: --> http://en.wikipedia.org/wiki/Slerp var changeFactor = this.CurrentTime.Ticks / (float)this.FixedTime.Ticks; var slerpQuaternion = Quaternion.Slerp(_startQuaternion, _targetQuaternion, changeFactor); _targetObject.RotationQuaternion = slerpQuaternion; }
/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { var currentLocationPercent = (float)(this.CurrentTime.TotalMilliseconds / this.FixedTime.TotalMilliseconds); var toIncreaseTotal = _increaseTotal * currentLocationPercent; var toIncrease = toIncreaseTotal - _alreadyIncreased; _setValueAction(_getValueFunc() + toIncrease); _alreadyIncreased = toIncreaseTotal; }
/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { _targetObject.Position = _startVector + Vector3Ex.GetXY(_moveHelper !.GetPartialMoveDistance(this.CurrentTime)); }
/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { var changeFactor = this.CurrentTime.Ticks / (float)this.FixedTime.Ticks; _targetObject.Scaling = _startScaling + _moveScaling * changeFactor; }
/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { var percentagePassed = this.CurrentTime.Ticks / (float)_duration.Ticks; _targetObject.RotationEuler = _startRotation + _changeRotation * percentagePassed; }
/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> /// <param name="updateState"></param> /// <param name="animationState"></param> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { if (animationState.RunningAnimationsIndex == 0) { this.NotifyAnimationFinished(); } }
/// <summary> /// Called each time the CurrentTime value gets updated. /// </summary> protected override void OnCurrentTimeUpdated(IAnimationUpdateState updateState, AnimationState animationState) { var changeFactor = this.CurrentTime.Ticks / (float)this.FixedTime.Ticks; _targetObject.AccentuationFactor = _startAccentuation + _moveAccentuation * changeFactor; }