| | |
| | | get { return this.towerArray; } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 处理按钮升级相关. |
| | | /// </summary> |
| | | private void Update() |
| | | { |
| | | float gstime = EndlessUIStart.instance.GameStartTime; |
| | | if (gstime <= 0) return; |
| | | |
| | | if ((!bCdTimeStart) && (LEVELUP_TOWER_TIME - gstime) <= JsonDataCenter.TOWERLVLUP_CDTIME) |
| | | { |
| | | bCdTimeStart = true; |
| | | btnLvlUpCdTime = LEVELUP_TOWER_TIME - gstime; |
| | | } |
| | | if ((!bSetBuyLvlUp) && (gstime > LEVELUP_TOWER_TIME)) |
| | | { |
| | | bSetBuyLvlUp = true; |
| | | this.randomBtn.GetComponent<Image>().sprite = buyBtnLevelUp; |
| | | } |
| | | |
| | | // 更新倒计时: |
| | | if ((!bSetBuyLvlUp) && bCdTimeStart) |
| | | { |
| | | btnLvlUpCdTime -= Time.deltaTime; |
| | | string distr = ((int)Math.Ceiling(btnLvlUpCdTime)).ToString() + "s"; |
| | | } |
| | | } |
| | | |
| | | public void actionTest() |
| | | { |
| | | multipara((str, strnew) => { Debug.Log(str + strnew); }, "Ying"); |
| | |
| | | if (gameUI.isBuilding) |
| | | gameUI.CancelGhostPlacement(); |
| | | |
| | | // if (level == -1) |
| | | // level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1); |
| | | if (level == -1) |
| | | level = Mathf.Min(EndlessGameUI.instance.MinLevel, 1); |
| | | |
| | | return gameUI.RandomPlaceTower(tower, posx, posy, 3, cost, false, isFirstAppear); |
| | | return gameUI.RandomPlaceTower(tower, posx, posy, level, cost, false, isFirstAppear); |
| | | } |
| | | |
| | | /// <summary> |