wangguan
2020-12-23 1e192494412a34d17548834a6aff639202cdfdda
Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs
@@ -9,6 +9,7 @@
using TMPro;
using KTGMGemClient;
using DG.Tweening;
using System.Collections;
public class EndlessRandomTower : Singleton<EndlessRandomTower>
{
@@ -57,11 +58,32 @@
    public ParticleSystem btnPS;
    IEnumerator ReadJson()
    {
        while (!GameConfig.JsonReadDone)
        {
            yield return 10;
        }
        countDownLimit = JsonDataCenter.GetById<battle>(23).value;
        Debug.Log("设置了倒计时:" + countDownLimit);
        yield break;
    }
    // Start is called before the first frame update
    void Start()
    {
        countDownLimit = JsonDataCenter.GetById<battle>(23).value;
        //Debug.Log("设置了倒计时:" + countDownLimit);
#if UNITY_ANDROID
#endif
#if UNITY_IPHONE
#endif
#if UNITY_EDITOR
#endif
        StartCoroutine(ReadJson());
        if (!EndlessLevelManager.instanceExists)
            Debug.LogError("[UI] No level manager for tower list");
@@ -83,14 +105,16 @@
        bSetBuyLvlUp = false;
        bCdTimeStart = false;
        randomBtn.onClick.AddListener(delegate () { onClick(EFeatureTower.NULL); });
        UpdateDescDisplay();
        NormalDesc.text = $"购买{0 + 1}级精灵";
        Invoke("UpdateDescDisplay", 1.0f);
        //UpdateDescDisplay();
    }
    public void UpdateDescDisplay()
    {
        int minLevel = GameConfig.IsUpgradeTowerLevel ? 1 : 0;
        NormalDesc.text = $"购买{minLevel + 1}级宝石";
        NormalDesc.text = $"购买{minLevel + 1}级精灵";
    }
    public void ChangeBtnClickNormal()
@@ -301,8 +325,6 @@
    /// </summary>
    private void CheckTower()
    {
        Debug.Log("判断是否提示");
        //条件 金币是否满足,合成区是否有位置
        int result;
        int.TryParse(cashText.text.ToString(), out result);