Files
SoulliesOfficial 7580c4d87c 大更
2026-03-14 03:13:10 -04:00

50 lines
1.6 KiB
C#

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Ichni.RhythmGame
{
public abstract class NoteHoldingEffect : NoteEffectBase
{
#region [] Hold Specific Data
public float GetHoldingTime()
{
return (note as Hold).holdEndTime - note.exactJudgeTime;
}
#endregion
#region [] Effect Pattern Overrides
public override void UpdateEffect(float judgeTime)
{
EffectState state = CheckEffectState(judgeTime);
float songTime = CoreServices.TimeProvider.SongTime;
if (state == EffectState.Before && nowEffectState != EffectState.Before)
{
nowEffectState = EffectState.Before;
effectProgressPercent = 0;
Recover();
}
else if (state == EffectState.Middle && (note as Hold).preJudgeType != NoteBase.NoteJudgeType.NotJudged)
{
if (nowEffectState == EffectState.Before)
{
PreExecute();
}
nowEffectState = EffectState.Middle;
effectProgressPercent = (songTime - judgeTime) / effectTime;
Execute();
}
else if (state == EffectState.After && nowEffectState != EffectState.After)
{
nowEffectState = EffectState.After;
effectProgressPercent = 1;
Adjust();
}
}
#endregion
}
}