chenxin
2020-10-28 56f231f1f6523d7920cf32f033f9bb6f0015550f
Assets/Scripts/TowerDefense/Level/EndlessWaveManager.cs
@@ -197,8 +197,10 @@
            for (int i = 0; i < waveData.Count; ++i)
            {
                int tunel = waveData[i].Config.tunel;
                TunelList[tunel - 1].material = Resources.Load<Material>($"{tunelMaterialPath}{tunel}");
                GameObject obj = Resources.Load<GameObject>($"{faZhenPath}{tunel}");
                int tunelBgId = waveData[i].Config.tunel_bg;
                TunelList[tunel - 1].material = Resources.Load<Material>($"{tunelMaterialPath}{tunelBgId}");
                GameObject obj = Resources.Load<GameObject>($"{faZhenPath}{tunelBgId}");
                GameObject faZhen = Instantiate(obj);
                faZhen.transform.SetParent(TunelList[tunel - 1].gameObject.transform);
                faZhen.transform.localPosition = new Vector3(0, 1, 0);
@@ -206,7 +208,7 @@
                TunelList[tunel - 1].gameObject.SetActive(true);
                ParticleSystem ps = faZhen.transform.GetChild(0).GetComponent<ParticleSystem>();
                ps.Play();
                Destroy(ps.gameObject, ps.main.duration * 3);
                Destroy(faZhen, ps.main.duration * 3);
            }
            RefreshBoss();