chenxin
2020-11-25 b2722bf84115092dcf61a0f612b737c20eb11f27
Assets/Scripts/TowerDefense/UI/EndlessScoreManager.cs
@@ -181,24 +181,10 @@
        /// <param name="score"></param>
        private void ShowOneTimeKill(int count, int score)
        {
            // OneTimeKillText.text = $"{count}连杀 +{score}";
            // OneTimeKillObj.transform.localScale = Vector3.zero;
            // OneTimeKillObj.SetActive(true);
            // CanvasGroup cg = OneTimeKillObj.GetComponent<CanvasGroup>();
            // DOTween.To(() => OneTimeKillObj.transform.localScale, (Vector3 v) => OneTimeKillObj.transform.localScale = v, Vector3.one, 0.2f);
            // Tween t1 = DOTween.To(() => cg.alpha, (float v) => cg.alpha = v, 0f, 0.2f).SetDelay(2f);
            // t1.OnComplete(OnShowOneTimeKillComplete);
            Image obj = Instantiate(OneTimeKillObj);
            obj.transform.SetParent(GameObject.Find("Panel").transform, false);
            obj.sprite = Resources.Load<Sprite>($"UI/DoubleHit/hit_{count}");
            Animator animator = obj.GetComponent<Animator>();
            AnimatorClipInfo[] animatorClipInfos = animator.GetCurrentAnimatorClipInfo(0);
            Destroy(obj.gameObject, animatorClipInfos[0].clip.length);
        }
        private void OnShowOneTimeKillComplete()
        {
            // OneTimeKillObj.SetActive(false);
            Destroy(obj.gameObject, 2.05f);
        }
        /// <summary>