using System.Collections; using System.Collections.Generic; using DG.Tweening; using Ichni.Editor; using Ichni.RhythmGame.Beatmap; using Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse.Beatmap; using Lean.Pool; using UnityEngine; namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse { public class DTMNotePerfectBurst : NotePerfectEffect { private ParticleSystem effectParticle; public DTMNotePerfectBurst(NoteVisualBase noteVisual) { this.note = noteVisual.note; this.noteVisual = noteVisual; this.effectTime = 0f; } public override void Recover() { try { noteVisual.noteMain.SetActive(true); } catch { } if (note is Hold && noteVisual.isHighlighted) { noteVisual.extraPartList[0].gameObject.SetActive(true); } } public override void Adjust() { effectParticle = LeanPool.Spawn(noteVisual.effectPrefabList[0], noteVisual.judgeEffect.transform).GetComponent(); effectParticle.transform.SetParent(EditorManager.instance.cameraManager.gameCamera.transform); effectParticle.Play(); // effectParticle.transform.DOMove(noteVisual.noteVisualPosition, 0.2f); if (note is Hold && noteVisual.isHighlighted) { noteVisual.extraPartList[0].gameObject.SetActive(false); } noteVisual.noteMain.SetActive(false); LeanPool.Despawn(effectParticle.gameObject, 1); } public override EffectBase_BM ConvertToBM() { return new DTMNotePerfectBurst_BM(effectTime); } public override void SetUpInspector() { IHaveInspection inspector = EditorManager.instance.uiManager.inspector; var container = inspector.GenerateContainer("DTM Note Perfect Burst"); } } namespace Beatmap { public class DTMNotePerfectBurst_BM : NotePerfectEffect_BM { public DTMNotePerfectBurst_BM() { } public DTMNotePerfectBurst_BM(float effectTime) : base(effectTime) { } public override EffectBase ConvertToGameType(GameElement attachedGameElement) { return new DTMNotePerfectBurst(attachedGameElement as NoteVisualBase); } } } }