44 lines
1.3 KiB
C#
44 lines
1.3 KiB
C#
using Ichni.RhythmGame.Beatmap;
|
|
using UnityEngine;
|
|
|
|
namespace Ichni.RhythmGame.ThemeBundles.DepartureToMultiverse
|
|
{
|
|
public class DTMNoteGenerateExpand : NoteGenerateEffect
|
|
{
|
|
#region [初始化] Initialization
|
|
public DTMNoteGenerateExpand(NoteVisualBase noteVisual, float generateTime, float effectTime)
|
|
{
|
|
this.note = noteVisual.note;
|
|
this.noteVisual = noteVisual;
|
|
this.generateTime = generateTime;
|
|
this.effectTime = effectTime;
|
|
}
|
|
#endregion
|
|
|
|
#region [效果核心实现] Core Effect Implementation
|
|
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;
|
|
}
|
|
#endregion
|
|
}
|
|
|
|
}
|