wangguan
2020-12-22 7ea5599f685ea29f7ecab3516b7335fa93f6e2bf
Assets/Scripts/TowerDefense/UI/EndlessScoreManager.cs
@@ -30,7 +30,7 @@
        public Text DoubleHitText;
        public Image OneTimeKillObj;
        public DoubleHitImg OneTimeKillObj;
        public Text OneTimeKillText;
@@ -82,17 +82,7 @@
            if (count >= 10)
            {
                AddScore(0);
                ShowOneTimeKill(10, 500);
            }
            else if (count >= 8)
            {
                AddScore(0);
                ShowOneTimeKill(8, 200);
            }
            else if (count >= 5)
            {
                AddScore(0);
                ShowOneTimeKill(5, 100);
                ShowOneTimeKill();
            }
        }
@@ -116,6 +106,7 @@
                else
                    remainTime -= Time.deltaTime;
            }
        }
        /// <summary>
@@ -173,19 +164,17 @@
            DOTween.To(() => canvasGroup.alpha, (float v) => canvasGroup.alpha = v, 0, 0.3f);
        }
        /// <summary>
        /// 显示一次性击杀飘字
        /// </summary>
        /// <param name="count"></param>
        /// <param name="score"></param>
        private void ShowOneTimeKill(int count, int score)
        private void ShowOneTimeKill()
        {
            Image obj = Instantiate(OneTimeKillObj);
            obj.transform.SetParent(GameObject.Find("Panel").transform, false);
            obj.sprite = Resources.Load<Sprite>($"UI/DoubleHit/hit_{count}");
            Destroy(obj.gameObject, 2.05f);
            OneTimeKillObj.SetkillCount();
        }
        /// <summary>
        /// 飘连击奖励分数
        /// </summary>