private void OnMoveView(View view, Vector3 moveTo) { this.mIsAnimationNow = true; TweenExtensions.PlayForward(TweenSettingsExtensions.OnComplete <Tweener>(TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOLocalMove(view.get_transform(), moveTo, this.ANIMATION_TIME_MOVE, false), this.ANIMATION_EASE_MOVE), delegate { this.mIsAnimationNow = false; })); }
public void ClickAnimation(Action onFinished) { TweenExtensions.PlayForward(TweenSettingsExtensions.OnComplete <Tweener>(TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOScale(this.mButton_GoStage.get_transform(), new Vector3(0.8f, 0.8f, 0f), 0.15f), 20), delegate { TweenSettingsExtensions.OnComplete <Tweener>(TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOScale(this.mButton_GoStage.get_transform(), new Vector3(1f, 1f, 0f), 0.15f), 21), delegate { if (onFinished != null) { onFinished.Invoke(); } }); })); }
public void PlaySlotInAnimation() { if (DOTween.IsTweening(UIRevampRecipeScrollParentNew.AnimationType.SlotIn)) { DOTween.Kill(UIRevampRecipeScrollParentNew.AnimationType.SlotIn, false); } Sequence sequence = TweenSettingsExtensions.SetId <Sequence>(DOTween.Sequence(), UIRevampRecipeScrollParentNew.AnimationType.SlotIn); UIRevampRecipeScrollChildNew slot = this.mViews[0]; UIRevampRecipeScrollChildNew slot2 = this.mViews[1]; UIRevampRecipeScrollChildNew slot3 = this.mViews[2]; TweenSettingsExtensions.Append(sequence, this.GenerateSlotInTween(slot)); TweenSettingsExtensions.Append(sequence, this.GenerateSlotInTween(slot2)); TweenSettingsExtensions.Append(sequence, this.GenerateSlotInTween(slot3)); TweenSettingsExtensions.OnComplete <Sequence>(sequence, delegate { this.NotifyFinishedSlotInAnimation(); }); TweenExtensions.PlayForward(sequence); }