chenxin
2020-12-12 7d40c0103dd36587180a8326415cb2fe1b4912d1
Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs
@@ -86,11 +86,7 @@
    public void UpdateDescDisplay()
    {
        int minLevel = 0;
        if (EndlessUIStart.instance.GameStartTime >= JsonDataCenter.DOUBLE_GEM_TIME)
            minLevel = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
        int minLevel = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
        NormalDesc.text = $"购买{minLevel + 1}级宝石";
    }
@@ -261,7 +257,21 @@
    public void SetCountDown(bool isOn, bool isReset = false)
    {
        isCountStartDown = isOn;
        if (isReset) countDownTime = 0;
        if (isReset)
        {
            countDownTime = 0;
            if (needClickPS.isPlaying)
                needClickPS.Stop();
        }
    }
    public void SetPS(bool isOn)
    {
        if (needClickPS.gameObject.activeSelf != isOn)
        {
            needClickPS.gameObject.SetActive(isOn);
        }
    }
    float countDownTime = 0f;
    float countDownLimit = 5f;
@@ -274,7 +284,6 @@
        if (isCountStartDown)
        {
            countDownTime += Time.deltaTime;
            Debug.Log("倒计时中");
            if (countDownTime > countDownLimit)
            {
@@ -331,16 +340,8 @@
        if (gameUI.isBuilding)
            gameUI.CancelGhostPlacement();
        if (EndlessUIStart.instance.GameStartTime >= JsonDataCenter.DOUBLE_GEM_TIME)
        {
            if (level == -1)
                level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
        }
        else
        {
            if (level == -1)
                level = 0;
        }
        if (level == -1)
            level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1);
        return gameUI.RandomPlaceTower(tower, posx, posy, level, cost, false, isFirstAppear);
    }