wangguan
2020-11-04 2ae9edd5bfd8b8baabb8cd995485f9ade4faebc9
Assets/Scripts/TowerDefense/Level/EndlessWaveLineManager.cs
@@ -19,17 +19,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;
@@ -53,10 +53,16 @@
    {
        if (id >= waveLineList.Count || waveLineList[id] == null) return;
        ParticleSystem playParticle = Instantiate(skillFirePrefab);
        playParticle.transform.position = EndlessLevelManager.instance.WaveManager.GetWaveEndPos(id);
        playParticle.Play();
        Destroy(playParticle.gameObject, playParticle.main.duration);
        GameObject obj = Instantiate(skillFirePrefab);
        ParticleSystem ps = obj.GetComponent<ParticleSystem>();
        if (ps == null)
            ps = obj.transform.GetChild(0).GetComponent<ParticleSystem>();
        ps.transform.position = EndlessLevelManager.instance.WaveManager.GetWaveEndPos(id);
        ps.Play();
        AudioSourceManager.Ins.Play(AudioEnum.FireSkill);
        Destroy(obj, ps.main.duration);
    }
    /// <summary>
@@ -66,10 +72,17 @@
    public void PlayBattleAreaBombEffect(Vector3 pos)
    {
        if (skillBombPrefab == null) return;
        ParticleSystem playParticle = Instantiate(skillBombPrefab);
        playParticle.transform.position = pos;
        playParticle.Play();
        Destroy(playParticle.gameObject, playParticle.main.duration);
        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();
        AudioSourceManager.Ins.Play(AudioEnum.LightningSkill);
        Destroy(obj, ps.main.duration);
    }
    /// <summary>