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(); 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); } } } }