| | |
| | | /// <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; |
| | | |
| | |
| | | { |
| | | 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, 5f); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 在所有兵线上播放特效 |
| | | /// </summary> |
| | | public void PlayAllWaveLineEffect() |
| | | { |
| | | for (int i = 0; i < waveLineList.Count; i++) |
| | | { |
| | | 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(i); |
| | | ps.Play(); |
| | | AudioSourceManager.Ins.Play(AudioEnum.FireSkill); |
| | | |
| | | Destroy(obj, 5f); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | 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, 5f); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// 某一个位置攻击塔位放下。 |
| | | /// </summary> |
| | | /// <param name="pos"></param> |
| | | public void AttackTowerFixed(int pos) |
| | | public void AttackTowerFixed(int pos, bool playEffect = true) |
| | | { |
| | | if (pos >= waveLineList.Count || waveLineList[pos] == null) return; |
| | | if (pos >= waveLineList.Count || waveLineList[pos] == null || !playEffect) return; |
| | | |
| | | // 无尽模式改为只有一条兵线 |
| | | WaveLineFlash(pos); |