chenxin
2020-11-16 181cd73136a98d45cf8751f8fee0bdb45a78db77
Assets/Scripts/TowerDefense/Towers/Placement/TowerPlacementGrid.cs
@@ -198,6 +198,11 @@
            return this.arrTowerEnergyUi[x];
        }
        public FreezeBreath GetFreezeBreath(int x, int y)
        {
            return null;
        }
        /// <summary>
        /// 获取一个可以放置塔防的位置.
        /// </summary>
@@ -355,7 +360,7 @@
                    Vector3 tpos = this.transform.position;
                    tpos.y += 5.0f;
                    PlayParticle.transform.position = tpos;
                    //Vector3 lookVec = Vector3.zero;
                    //lookVec.x = 1;
                    //PlayParticle.transform.LookAt(lookVec);
@@ -763,16 +768,16 @@
            for (int x = 0; x < dimensions.x; x++)
            {
                m_arrTowerBulletUIPos[x].x = m_arrGridCentUIPos[x, dy].x + m_fGridUISize/2.0f - 10;
                m_arrTowerBulletUIPos[x].x = m_arrGridCentUIPos[x, dy].x + m_fGridUISize / 2.0f - 10;
                m_arrTowerBulletUIPos[x].y = m_arrGridCentUIPos[x, dy].y;
                GameObject go = GameObject.Find("BattleMainUI");
                if (!go) continue;
                Transform tp = go.GetComponent<Transform>();
                GameObject img;
                img = Instantiate(towerBulletUIPrefab);
                img.GetComponent<Transform>().SetParent(tp, true);
                Vector3 tpos = img.transform.position;
@@ -804,7 +809,7 @@
                vpos.x -= (gridSize / 2.0f);
                vpos.y += 5.0f;
                arrTowerEnergyEffect[x] = Instantiate( energyEffectPrefab );
                arrTowerEnergyEffect[x] = Instantiate(energyEffectPrefab);
                arrTowerEnergyEffect[x].transform.position = vpos;
                arrTowerEnergyEffect[x].Stop();
            }
@@ -817,10 +822,10 @@
        /// </summary>
        /// <param name="x"></param>
        /// <param name="play">是播放还是停止播放</param>
        public void PlayEnergyEffect( int x,bool play = true )
        public void PlayEnergyEffect(int x, bool play = true)
        {
            if (!arrTowerEnergyEffect[x]) return;
            if( play)
            if (play)
            {
                arrTowerEnergyEffect[x].Play();
            }