Files
ichni_Official/Assets/ThemeBundles/DepartureToMultiverse/Scripts/NoteEffect/DTMNoteGoodBurst.cs
SoulliesOfficial 6aa498f6be
2025-08-11 14:04:06 -04:00

60 lines
1.8 KiB
C#

using System.Collections;
using System.Collections.Generic;
using Ichni.RhythmGame.Beatmap;
using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap;
using Lean.Pool;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMNoteGoodBurst : NoteGoodEffect
{
private ParticleSystem effectParticle;
public DTMNoteGoodBurst(NoteVisualBase noteVisual)
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.effectTime = 0f;
}
public override void Recover()
{
noteVisual.noteMain.SetActive(true);
}
public override void Adjust()
{
effectParticle = LeanPool.Spawn(noteVisual.effectPrefabList[1], noteVisual.judgeEffect.transform).GetComponent<ParticleSystem>();
effectParticle.transform.SetParent(GameManager.instance.cameraManager.gameCamera.transform);
effectParticle.Play();
noteVisual.noteMain.SetActive(false);
LeanPool.Despawn(effectParticle.gameObject, 1);
}
public override EffectBase_BM ConvertToBM()
{
return new DTMNoteGoodBurst_BM(effectTime);
}
}
namespace Beatmap
{
public class DTMNoteGoodBurst_BM : NoteGoodEffect_BM
{
public DTMNoteGoodBurst_BM()
{
}
public DTMNoteGoodBurst_BM(float effectTime) : base(effectTime)
{
}
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
return new DTMNoteGoodBurst(attachedGameElement as NoteVisualBase);
}
}
}
}