chenxin
2020-10-27 38136a34de9aa36bf15ec7471abd56e2cba6c26f
Assets/Scripts/TowerDefense/Level/WaveLineSelMgr.cs
@@ -35,17 +35,17 @@
    /// <summary>
    /// 火攻击效果
    /// </summary>
    public ParticleSystem skillFirePrefab;
    public GameObject skillFirePrefab;
    /// <summary>
    /// 炸弹攻击效果
    /// </summary>
    public ParticleSystem skillBombPrefab;
    public GameObject skillBombPrefab;
    /// <summary>
    /// 停止移动的Buff特效.
    /// </summary>
    public ParticleSystem bufStopMovePrefab;
    public GameObject bufStopMovePrefab;
    protected bool zeroState = true;
@@ -186,9 +186,14 @@
    {
        if ((id >= waveLineList.Count) || (waveLineList[id] == null)) return;
       
        ParticleSystem playParticle = Instantiate(skillFirePrefab);
        playParticle.transform.position = LevelManager.instance.waveManager.GetWaveEndPos( id );
        playParticle.Play();
        GameObject obj = Instantiate(skillFirePrefab);
        ParticleSystem ps = obj.GetComponent<ParticleSystem>();
        if (ps == null)
            ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>();
        ps.transform.position = LevelManager.instance.waveManager.GetWaveEndPos(id);
        ps.Play();
        Destroy(ps.gameObject, ps.main.duration);
    }
    /// <summary>
@@ -198,10 +203,15 @@
    public void PlayBattleAreaBombEffect( Vector3 pos)
    {
        if (skillBombPrefab == null) return;
        ParticleSystem playParticle = Instantiate(skillBombPrefab);
        playParticle.transform.position = pos;
        playParticle.Play();
        GameObject obj = Instantiate(skillBombPrefab);
        ParticleSystem ps = obj.GetComponent<ParticleSystem>();
        if (ps == null)
            ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>();
        ps.transform.position = pos;
        ps.Play();
        Destroy(ps.gameObject, ps.main.duration);
    }