private void outputGameOverText() { textAnimator = new DOTweenTMPAnimator(gameOverText); var sequence = DOTween.Sequence(); for (int i = 0; i < textAnimator.textInfo.characterCount; i++) { sequence .Append(textAnimator.DOFadeChar(i, 1, 0.1f)) .Join(textAnimator.DOPunchCharScale(i, 1.5f, 0.1f)) .Play(); } }
/// <summary> /// modelから通知を受け取り /// feverテキストの描画 /// カット演出 /// </summary> public void SetFeverTextAnimation() { textAnimator = new DOTweenTMPAnimator(feverTextAnimation); var sequence = DOTween.Sequence(); for (int i = 0; i < textAnimator.textInfo.characterCount; i++) { sequence .Append(textAnimator.DOFadeChar(i, 1, 0.1f)) .Join(textAnimator.DOPunchCharScale(i, 1.5f, 0.1f)) .Play() .OnComplete(() => { DOVirtual.DelayedCall(1.5f, () => feverTextAnimation.text = ""); }); } }
private void ComboAnimation() { textAnimator = new DOTweenTMPAnimator(comboText); var sequence = DOTween.Sequence(); for (int i = 0; i < textAnimator.textInfo.characterCount; i++) { sequence .Append(textAnimator.DOFadeChar(i, 1, 1.5f)) .Join(comboImage.DOPunchScale(Vector3.one, 1.5f)) //.Join(comboImage.DOFade(0f, 1.5f).SetEase(Ease.Flash)) //(0.1f, 1.2f).SetEase(Ease.InSine).SetLoops(-1, LoopType.Yoyo)) .Join(textAnimator.DOPunchCharScale(i, 1.5f, 1.5f)) .Play() //.SetDelay(1.8f) .OnComplete(() => { Destroy(this.gameObject); }); } }
public void Animate() { //bodyTexts.alpha = 1; titleTextAnimator = new DOTweenTMPAnimator(bodyText); //ダイアログ表示 var sequence = DOTween.Sequence() .Append(dialogCanvasGroup.DOFade(1f, 0.2f)) .Join(frameRextTransform.DOSizeDelta(new Vector2(frameSizeDelta.x, 2), 1f)) //同時実行 .Append(frameRextTransform.DOSizeDelta(new Vector2(frameSizeDelta.x, frameSizeDelta.y), 1f)); titleButton.alpha = 0; sequence .Append(borderCanvasGroup.DOFade(1f, 0.2f)) .Join(stageButton1.DOFade(1f, 0.2f)) .Append(titleText.DOFade(1f, 0.2f)) .Play(); //タイトル表示 for (int i = 0; i < titleTextAnimator.textInfo.characterCount; i++) { sequence .Append(titleTextAnimator.DOFadeChar(i, 1, 0.1f)) .Join(titleTextAnimator.DOPunchCharScale(i, 1.5f, 0.1f)); } //新記録 //ランクの表示 //閉じるボタンの表示・実行 sequence.Append(buttonCloseCanvasGroup.DOFade(1.0f, 0.25f)) .Append(startButton1.DOFade(1f, 0.1f)) .OnComplete(() => dialogCanvasGroup.blocksRaycasts = true) .Play(); }
public void SetClearUI() { textAnimator = new DOTweenTMPAnimator(gameClearText); var sequence = DOTween.Sequence(); for (int i = 0; i < textAnimator.textInfo.characterCount; i++) { sequence .AppendCallback(() => Observable.Timer(TimeSpan.FromSeconds(4)).Subscribe(_ => { gameClearText.text = ""; gameClearText.alpha = 0; Debug.Log("スコア表示"); clearDialogAnimation.Animate(); }).AddTo(this)) .Append(textAnimator.DOFadeChar(i, 1, 0.1f)) .Join(textAnimator.DOPunchCharScale(i, 1.5f, 0.1f)) .Play(); } }
private void outputText() { demoTextAnimator = new DOTweenTMPAnimator(demoText); var sequence = DOTween.Sequence(); for (int i = 0; i < demoTextAnimator.textInfo.characterCount; i++) { sequence .Append(demoTextAnimator.DOFadeChar(i, 1, 0.1f)) .Join(demoTextAnimator.DOPunchCharScale(i, 1.5f, 0.1f)) .InsertCallback(0f, () => CreateChara()) .Play(); } //TODO:createCharaを実行した後に画面外に抜けたら、ゲームオーバーの表示をしたい //OnComplete以外の関数呼び出しを調べる必要がある sequence //dmeoText.textだと表示されない。TMPのリファレンス読む必要がある .AppendCallback(() => isDemo = true) .OnComplete(() => DemoOutputGameOverText()) .Play(); }
public void Animate() { titleTextAnimator = new DOTweenTMPAnimator(titleText); //ダイアログ表示 var sequence = DOTween.Sequence() .Append(dialogCanvasGroup.DOFade(1f, 0.2f)) .Join(frameRextTransform.DOSizeDelta(new Vector2(frameSizeDelta.x, 2), 1f)) //同時実行 .Append(frameRextTransform.DOSizeDelta(new Vector2(frameSizeDelta.x, frameSizeDelta.y), 1f)); //タイトル表示 for (int i = 0; i < titleTextAnimator.textInfo.characterCount; i++) { sequence .Append(titleTextAnimator.DOFadeChar(i, 1, 0.1f)) .Join(titleTextAnimator.DOPunchCharScale(i, 1.5f, 0.1f)); } //スコア表示 sequence .Append(scoreLabelText.DOFade(1f, 0.5f)) .Append(scoreValueText.DOFade(1f, 3f)) .Join(scoreValueText.DOCounter(0, score, 3f, false)) .AppendCallback(() => scoreValueText.transform.localScale = Vector3.one * 1.25f) .Append(scoreValueText.transform.DOScale(Vector3.one, 0.5f)) .AppendInterval(0.5f); //新記録 //ランクの表示 //閉じるボタンの表示・実行 sequence.Append(buttonCloseCanvasGroup.DOFade(1.0f, 0.25f)) .OnComplete(() => dialogCanvasGroup.blocksRaycasts = true) .Play(); }