wangguan
2020-12-17 82cc6bd447a9eefa2bdc1e21e93938d95213755a
Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
@@ -350,6 +350,25 @@
            return null;
        }
        /// <summary>
        /// 根据塔位索引位置,查找位置上是否有对应的塔防数据。
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        public int GetTowerNum()
        {
            int num = 0;
            foreach (Tower lt in m_listTower)
            {
                if (lt.gridPosition.y == 0 || lt.gridPosition.y == 1)
                {
                    num++;
                }
            }
            return num;
        }
        public bool towerInList(Tower t)
        {
            return m_listTower.Contains(t);
@@ -793,7 +812,9 @@
                    PlayUpgradeEffect(m_listTower[i]);
                }
            }
            GameConfig.IsUpgradeTowerLevel = true;
            UpdateMinLevelArr();
            EndlessRandomTower.instance.UpdateDescDisplay();
        }
        /// <summary>
@@ -1133,7 +1154,7 @@
                        if (checkTowerPlaceTower != null)
                        {
                            Debug.Log(checkTowerPlaceTower.name);
                            //Debug.Log(checkTowerPlaceTower.name);
                            if (m_CurrentTower.controller.towerFeature == EFeatureTower.NULL)
                            {
@@ -1769,7 +1790,7 @@
                        CancelGhostPlacement();
                        return false;
                    }
                    PlaceGhost(pointer);
                }
                return true;
@@ -2280,7 +2301,6 @@
            bool successfulPurchase = EndlessLevelManager.instance.Currency.TryPurchase(cost);
            if (!successfulPurchase) return false;
            EndlessRandomTower.instance.UpdateDescDisplay();
            SetUpGhostTower(tow);
            //Debug.Log("设置影子塔防.");
            m_CurrentTower.Show();