66 lines
2.0 KiB
C#
66 lines
2.0 KiB
C#
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()
|
|
{
|
|
//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);
|
|
}
|
|
|
|
public override EffectBase_BM ConvertToBM()
|
|
{
|
|
return new DTMNotePerfectBurst_BM(effectTime);
|
|
}
|
|
}
|
|
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
} |