| | |
| | | public Image CritWord; |
| | | |
| | | /// <summary> |
| | | /// 冰冻飘字 |
| | | /// </summary> |
| | | public Image FrostWord; |
| | | |
| | | /// <summary> |
| | | /// 购买塔防按钮上的Text. |
| | | /// </summary> |
| | | protected TextMeshProUGUI towerPriceText; |
| | |
| | | if (tower.towerName != towerOld.towerName) |
| | | continue; |
| | | |
| | | newT = Instantiate(tower, transform); |
| | | newT = tower; |
| | | break; |
| | | } |
| | | |
| | |
| | | towerToMove.Sell(); |
| | | towerToMove = null; |
| | | } |
| | | if (m_CurrentTower != null && m_CurrentTower.controller != null) |
| | | Destroy(m_CurrentTower.controller.gameObject); |
| | | } |
| | | else if (EndlessLevelManager.instanceExists && IsSubstitute(pointerInfo)) |
| | | { |
| | |
| | | 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() |
| | | { |
| | | // 获取相应的放置区域。 |