| | |
| | | public Image CritWord; |
| | | |
| | | /// <summary> |
| | | /// 冰冻飘字 |
| | | /// </summary> |
| | | public Image FrostWord; |
| | | |
| | | /// <summary> |
| | | /// 购买塔防按钮上的Text. |
| | | /// </summary> |
| | | protected TextMeshProUGUI towerPriceText; |
| | |
| | | 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() |
| | | { |
| | | // 获取相应的放置区域。 |