47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using Lean.Pool;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
|
{
|
|
public class DTMNotePerfectBurst : NotePerfectEffect
|
|
{
|
|
#region [效果属性与状态] Effect Fields & States
|
|
private ParticleSystem effectParticle;
|
|
#endregion
|
|
|
|
#region [初始化] Initialization
|
|
public DTMNotePerfectBurst(NoteVisualBase noteVisual)
|
|
{
|
|
this.note = noteVisual.note;
|
|
this.noteVisual = noteVisual;
|
|
this.effectTime = 0f;
|
|
}
|
|
#endregion
|
|
|
|
#region [效果核心实现] Core Effect Implementation
|
|
public override void Recover()
|
|
{
|
|
//effectParticle.Stop();
|
|
noteVisual.noteMain.SetActive(true);
|
|
}
|
|
|
|
public override void Adjust()
|
|
{
|
|
note.SetPerfectPosition();
|
|
effectParticle = LeanPool.Spawn(noteVisual.effectPrefabList[0], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
|
|
effectParticle.transform.SetParent(GameManager.Instance.cameraManager.gameCamera.transform);
|
|
effectParticle.Play();
|
|
noteVisual.noteMain.SetActive(false);
|
|
|
|
if (note is Hold)
|
|
{
|
|
noteVisual.extraPartList[0].gameObject.SetActive(false);
|
|
}
|
|
|
|
LeanPool.Despawn(effectParticle.gameObject, 1);
|
|
}
|
|
#endregion
|
|
}
|
|
|
|
}
|