Files
ichni_Official/Assets/ThemeBundles/DepartureToMultiverse/Scripts/Game/Note/NoteEffect/DTMNoteGoodBurst.cs

45 lines
1.3 KiB
C#
Raw Normal View History

2025-07-21 05:42:20 -04:00
using Lean.Pool;
2025-06-03 02:42:28 -04:00
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMNoteGoodBurst : NoteGoodEffect
{
2026-03-14 03:13:10 -04:00
#region [] Effect Fields & States
2025-06-03 02:42:28 -04:00
private ParticleSystem effectParticle;
2026-03-14 03:13:10 -04:00
#endregion
2025-06-03 02:42:28 -04:00
2026-03-14 03:13:10 -04:00
#region [] Initialization
2025-06-03 02:42:28 -04:00
public DTMNoteGoodBurst(NoteVisualBase noteVisual)
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.effectTime = 0f;
}
2026-03-14 03:13:10 -04:00
#endregion
#region [] Core Effect Implementation
2025-06-03 02:42:28 -04:00
public override void Recover()
{
noteVisual.noteMain.SetActive(true);
}
public override void Adjust()
{
2025-10-02 23:49:18 -04:00
effectParticle = LeanPool.Spawn(noteVisual.effectPrefabList[1], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
2026-03-14 03:13:10 -04:00
effectParticle.transform.SetParent(GameManager.Instance.cameraManager.gameCamera.transform);
2025-06-03 02:42:28 -04:00
effectParticle.Play();
noteVisual.noteMain.SetActive(false);
2025-10-02 23:49:18 -04:00
if (note is Hold)
{
noteVisual.extraPartList[0].gameObject.SetActive(false);
}
2025-07-21 05:42:20 -04:00
LeanPool.Despawn(effectParticle.gameObject, 1);
2025-06-03 02:42:28 -04:00
}
2026-03-14 03:13:10 -04:00
#endregion
2025-06-03 02:42:28 -04:00
}
2026-03-14 03:13:10 -04:00
}