River Jiang
2020-10-28 d2bc86161bf01b9ac01ba7b4b6ee7e341778c0c2
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,14 @@
    {
        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();
        Destroy(ps.gameObject, ps.main.duration);
    }
    /// <summary>
@@ -66,10 +70,15 @@
    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();
        Destroy(ps.gameObject, ps.main.duration);
    }
    /// <summary>
@@ -115,19 +124,7 @@
    {
        if (pos >= waveLineList.Count || waveLineList[pos] == null) return;
        int subone = pos - 1;
        int addone = pos + 1;
        if (subone >= 0)
            WaveLineFlash(subone);
        // 无尽模式改为只有一条兵线
        WaveLineFlash(pos);
        if (addone < waveLineList.Count)
            WaveLineFlash(addone);
    }
    // Update is called once per frame
    void Update()
    {
    }
}
}