Files
ichni_Official/Assets/ThemeBundles/DepartureToMultiverse/Scripts/NoteEffect/DTMNoteGenerateExpand.cs

69 lines
1.9 KiB
C#
Raw Normal View History

2025-06-03 02:42:28 -04:00
using Ichni.RhythmGame.Beatmap;
using UnityEngine;
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
{
public class DTMNoteGenerateExpand : NoteGenerateEffect
{
public DTMNoteGenerateExpand(NoteVisualBase noteVisual, float generateTime, float effectTime)
{
this.note = noteVisual.note;
this.noteVisual = noteVisual;
this.generateTime = generateTime;
this.effectTime = effectTime;
}
public sealed override void Recover()
{
noteVisual.noteMain.SetActive(false);
noteVisual.noteMain.transform.localScale = Vector3.zero;
}
public override void PreExecute()
{
noteVisual.noteMain.SetActive(true);
}
public override void Execute()
{
float e = AnimationCurveEvaluator.Evaluate(AnimationCurveType.OutQuad, effectProgressPercent);
noteVisual.noteMain.transform.localScale = e * Vector3.one;
}
public override void Adjust()
{
noteVisual.noteMain.transform.localScale = Vector3.one;
}
public override EffectBase_BM ConvertToBM()
{
return new Beatmap.DTMNoteGenerateExpand_BM(effectTime, generateTime);
}
}
namespace Beatmap
{
public class DTMNoteGenerateExpand_BM : NoteGenerateEffect_BM
{
public new float effectTime;
public new float generateTime;
public DTMNoteGenerateExpand_BM()
{
}
public DTMNoteGenerateExpand_BM(float effectTime, float generateTime) :
base(effectTime, generateTime)
{
}
public override EffectBase ConvertToGameType(GameElement attachedGameElement)
{
return new DTMNoteGenerateExpand(attachedGameElement as NoteVisualBase, generateTime, effectTime);
}
}
}
}