From 0cea50e11c3a6d1e247e60dc02e7bf2569a3b5f1 Mon Sep 17 00:00:00 2001
From: chenxin <chenxin6991@163.com>
Date: Sat, 12 Dec 2020 18:20:13 +0800
Subject: [PATCH] 火不够范围也能打泡泡bug

---
 Assets/Scripts/UI/FinalPanel/FinalPanel.cs |   27 +++++++++++++++++++--------
 1 files changed, 19 insertions(+), 8 deletions(-)

diff --git a/Assets/Scripts/UI/FinalPanel/FinalPanel.cs b/Assets/Scripts/UI/FinalPanel/FinalPanel.cs
index 14e3b1e..3a89838 100644
--- a/Assets/Scripts/UI/FinalPanel/FinalPanel.cs
+++ b/Assets/Scripts/UI/FinalPanel/FinalPanel.cs
@@ -80,6 +80,8 @@
     /// <param name="myScore">789220</param>
     public void SetData(string waveInfo, int myScore)
     {
+        AudioSourceManager.Ins.StopBGAudio();//进来后停止播放BGM
+
         _waveInfo = waveInfo;
         _myScore = myScore;
         isFirstStart = true;//首次启动下载到数据执行动效
@@ -202,6 +204,8 @@
 
     private void PlayDoTween()
     {
+        AudioSourceManager.Ins.Play(AudioEnum.End);
+
         Sequence agentTweenSeq = DOTween.Sequence();
         //先出现
         Image tsTiele = transform.Find("Image_Tiele").GetComponent<Image>();
@@ -219,13 +223,19 @@
         agentTweenSeq.Join(Image2.DOFade(1, imageTime));
 
         Image Image3 = transform.Find("Image3").GetComponent<Image>();
+
         agentTweenSeq.Append(Image3.transform.DOScale(Vector3.one, imageTime).SetEase(Ease.InOutBack));//变化图片大小
         agentTweenSeq.Join(Image3.DOFade(1, imageTime));
+        agentTweenSeq.AppendCallback(() =>
+       {
+           Debug.Log("开始播放声音");
+           AudioSourceManager.Ins.Play(AudioEnum.FinalScore);
+       });
         agentTweenSeq.Join(DOTween.To(delegate (float value)
         {
             var temp = Math.Floor(value);
             scoreText.text = temp + "";
-        }, 0, _myScore, 1.0f));
+        }, 0, _myScore, 1.4f));
         agentTweenSeq.AppendCallback(StartLoadLargeData);
 
         tsLight = transform.Find("ImageLight");
@@ -272,16 +282,16 @@
             scrollerCanvasGroup.alpha = 1;
             Debug.Log("开始展示排行榜");
         }
-        itemCanvasGroup.alpha = 1;
-        float duration = 0.1f;
-        for (int i = 0; i < playPSItem.Count; i++)
-        {
-            playPSItem[i].PlayDoTween(duration);
-            yield return new WaitForSeconds(duration);
-        }
 
         if (playPSItem.Count > 0)
         {
+            itemCanvasGroup.alpha = 1;
+            float duration = 0.1f;
+            for (int i = 0; i < playPSItem.Count; i++)
+            {
+                playPSItem[i].PlayDoTween(duration);
+                yield return new WaitForSeconds(duration);
+            }
             image_HScore.SetActive(true);
             goonFade = true;
             ShowGoOnText();
@@ -342,6 +352,7 @@
     /// </summary>
     protected void RotateLight()
     {
+        Debug.Log("开始旋转");
         isRotate = true;
         offect = 0;
     }

--
Gitblit v1.9.1