| | |
| | | public GameObject woodAppearEffect1; |
| | | public GameObject woodAppearEffect2; |
| | | /// <summary> |
| | | /// 保存所有生成或合成的塔的最小等级,索引0 -> 火木水塔 索引1 -> 技能塔 |
| | | /// 保存所有生成或合成的塔的最小等级 |
| | | /// </summary> |
| | | /// <value></value> |
| | | public int MinLevel; |
| | |
| | | { |
| | | if (m_CurrentTower.controller.towerFeature == EFeatureTower.NULL) |
| | | { |
| | | List<IntVector2> allTowerP = new List<IntVector2>(); |
| | | List<IntVector2> allPSTowerP = new List<IntVector2>();//需要播放升级动画的 |
| | | List<IntVector2> allTowerP = null;//排除不能合成的 |
| | | // List<IntVector2> allPSTowerP = new List<IntVector2>();//需要播放升级动画的 |
| | | |
| | | if (towerToMove) |
| | | { |
| | | if (towerToMove.gridPosition.y == 0 || towerToMove.gridPosition.y == 1) |
| | | { |
| | | allTowerP = new List<IntVector2>(); |
| | | for (int i = 0; i < m_listTower.Count; i++) |
| | | { |
| | | if (m_listTower[i].bInAttackMode && towerToMove && m_listTower[i].currentLevel == dragTowerLevel && m_listTower[i].towerName == towerToMove.towerName) |
| | | { |
| | | if (towerToMove.gridPosition != m_listTower[i].gridPosition) |
| | | //说明可以合成 |
| | | allPSTowerP.Add(m_listTower[i].gridPosition); |
| | | // if (towerToMove.gridPosition != m_listTower[i].gridPosition) |
| | | // //说明可以合成 |
| | | // allPSTowerP.Add(m_listTower[i].gridPosition); |
| | | } |
| | | else |
| | | { |
| | |
| | | allTowerP.Add(m_listTower[i].gridPosition); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | if (m_CurrentArea != null) |
| | | { |
| | | //修改为只要开启格子都可以放 |
| | | (m_CurrentArea as TowerPlacementGridEndless).CheckAllCanPlace(allTowerP); |
| | | //(m_CurrentArea as TowerPlacementGridEndless).PlayPS(allPSTowerP); |
| | | } |
| | | |
| | | |
| | | } |
| | | else if (m_CurrentTower.controller.towerFeature == EFeatureTower.Skill_Fire || m_CurrentTower.controller.towerFeature == EFeatureTower.Skill_Bomb) |
| | |
| | | |
| | | // 判断目标位置是否有Tower且类型和等级一致,如果没有,则GhostTower删除,原Tower显示。 |
| | | if (isValidateCombineTarget(pointerInfo)) |
| | | { |
| | | TryPlaceTower(pointerInfo); |
| | | EndlessRandomTower.instance.UpdateDescDisplay(); |
| | | } |
| | | else if (isFreeAttackGrid(pointerInfo) && !bSkill) |
| | | { |
| | | if (!TryPlaceTower(pointerInfo, false, true)) |
| | |
| | | /// <param name="val"></param> |
| | | public void generateBloodText(Vector3 wpos, float val, bool crit = false, bool doubleHit = false, bool poison = false) |
| | | { |
| | | if (Mathf.FloorToInt(val) == 0) return; |
| | | |
| | | Vector3 spos = m_Camera.WorldToScreenPoint(wpos); |
| | | TextMoveDoTween tm; |
| | | if (crit) |
| | |
| | | bool successfulPurchase = EndlessLevelManager.instance.Currency.TryPurchase(cost); |
| | | if (!successfulPurchase) return false; |
| | | |
| | | EndlessRandomTower.instance.UpdateDescDisplay(); |
| | | SetUpGhostTower(tow); |
| | | //Debug.Log("设置影子塔防."); |
| | | m_CurrentTower.Show(); |
| | |
| | | base.Awake(); |
| | | |
| | | randomTowerBtn = transform.Find("BottomCanvas/Panel/TowerBuyBtn").GetComponent<Button>(); |
| | | DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10); |
| | | //DOTween.Init(true, true, LogBehaviour.Verbose).SetCapacity(200, 10); |
| | | |
| | | state = State.Normal; |
| | | m_Camera = GameObject.Find("SceneCamera3D").GetComponent<Camera>(); |
| | |
| | | } |
| | | //selEff.SetWaveLineSel(true); |
| | | } |
| | | else |
| | | { |
| | | if (currentEffect != null) |
| | | { |
| | | currentEffect.SetParticleSystem(false); |
| | | currentEffect = null; |
| | | } |
| | | } |
| | | } |
| | | // 炸弹是区域攻击显示: |
| | | else if (m_CurrentTower.controller.towerFeature == EFeatureTower.Skill_Bomb) |