chenxin
2020-12-12 000e8cbabb0639d2c4b90ebc28f08256f028d209
产生2级塔逻辑
4 files modified
15 ■■■■ changed files
Assets/Scripts/Common/GameConfig.cs 5 ●●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs 1 ●●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs 2 ●●● patch | view | raw | blame | history
Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs 7 ●●●● patch | view | raw | blame | history
Assets/Scripts/Common/GameConfig.cs
@@ -111,6 +111,11 @@
        /// </summary>
        public static int GameCompletedCount;
        /// <summary>
        /// 是否提升过所有塔的等级
        /// </summary>
        public static bool IsUpgradeTowerLevel;
        #region 各个塔的偏移量
        public static Vector3 fireScale = new Vector3(1.92f, 1.92f, 2.208f);
        public static Vector3 woodScale = new Vector3(1.5f, 1.5f, 2.82f);
Assets/Scripts/TowerDefense/UI/EndlessUIStart.cs
@@ -87,6 +87,7 @@
        InitSDK();
        bGameStart = false;
        bFirstLoaded = false;
        GameConfig.IsUpgradeTowerLevel = false;
        GameConfig.CreateRandomTower = true;
        bVibrate = new bool[4];
Assets/Scripts/TowerDefense/UI/HUD/EndlessGameUI.cs
@@ -812,6 +812,7 @@
                    PlayUpgradeEffect(m_listTower[i]);
                }
            }
            GameConfig.IsUpgradeTowerLevel = true;
            UpdateMinLevelArr();
            EndlessRandomTower.instance.UpdateDescDisplay();
        }
@@ -2300,7 +2301,6 @@
            bool successfulPurchase = EndlessLevelManager.instance.Currency.TryPurchase(cost);
            if (!successfulPurchase) return false;
            EndlessRandomTower.instance.UpdateDescDisplay();
            SetUpGhostTower(tow);
            //Debug.Log("设置影子塔防.");
            m_CurrentTower.Show();
Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs
@@ -86,7 +86,8 @@
    public void UpdateDescDisplay()
    {
        int minLevel = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
        int minLevel = GameConfig.IsUpgradeTowerLevel ? 1 : 0;
        NormalDesc.text = $"购买{minLevel + 1}级宝石";
    }
@@ -353,7 +354,9 @@
            gameUI.CancelGhostPlacement();
        if (level == -1)
            level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
        {
            level = GameConfig.IsUpgradeTowerLevel ? 1 : 0;
        }
        return gameUI.RandomPlaceTower(tower, posx, posy, level, cost, false, isFirstAppear);
    }