chenxin
2020-12-05 5bfd1103410659fbb523ad25f0e34413fe032ed2
Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
@@ -133,6 +133,11 @@
        public Image CritWord;
        /// <summary>
        /// 冰冻飘字
        /// </summary>
        public Image FrostWord;
        /// <summary>
        /// 购买塔防按钮上的Text.
        /// </summary>
        protected TextMeshProUGUI towerPriceText;
@@ -2052,6 +2057,18 @@
            obj.GetComponent<TextMoveDoTween>().FloatCritWord(screenPos.x, screenPos.y);
        }
        /// <summary>
        /// 冰冻飘字
        /// </summary>
        /// <param name="worldPos"></param>
        public void FloatFrostWord(Vector3 worldPos)
        {
            Vector3 screenPos = m_Camera.WorldToScreenPoint(worldPos);
            GameObject obj = Instantiate(FrostWord.gameObject);
            obj.GetComponent<Transform>().SetParent(GameObject.Find("MainUI/TextPanel").GetComponent<Transform>(), false);
            obj.GetComponent<TextMoveDoTween>().FloatFrostWord(screenPos.x, screenPos.y);
        }
        private void Start()
        {
            // 获取相应的放置区域。