liuzhiwei
2020-11-18 b9ee5c460e65922729cfcf57f6db02c274105c2c
Assets/Scripts/TowerDefense/UI/HUD/EndlessRandomTower.cs
@@ -52,6 +52,10 @@
    // 所有宝石位置权重列表
    private List<int> weightList;
    public Text NormalDesc;
    public Text SkillDesc;
    // Start is called before the first frame update
    void Start()
    {
@@ -77,6 +81,15 @@
        bCdTimeStart = false;
        randomBtn.onClick.AddListener(delegate () { onClick(EFeatureTower.NULL); });
        skillBtn.onClick.AddListener(delegate () { onClick(EFeatureTower.Skill_Bomb); });
        UpdateDescDisplay();
    }
    public void UpdateDescDisplay()
    {
        int minLevel = EndlessGameUI.instance.MinLevel;
        NormalDesc.text = $"购买{minLevel + 1}级宝石";
        SkillDesc.text = $"购买{minLevel + 1}级技能宝石";
    }
    public void ChangeBtnClickNormal()
@@ -302,16 +315,8 @@
        if (gameUI.isBuilding)
            gameUI.CancelGhostPlacement();
        if (EndlessUIStart.instance.GameStartTime >= LEVELUP_TOWER_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);
    }