| | |
| | | // 所有宝石位置权重列表 |
| | | private List<int> weightList; |
| | | |
| | | public Text NormalDesc; |
| | | |
| | | public Text SkillDesc; |
| | | |
| | | // Start is called before the first frame update |
| | | void Start() |
| | | { |
| | |
| | | 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() |
| | |
| | | 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); |
| | | } |