public void OnReleased(KaraokeSaitenAction action) { // Make sure that the user started holding the key during the hold note if (!holdStartTime.HasValue) { return; } // User stop singing this note EndSing(); }
public void AddAction(KaraokeSaitenAction action) { if (Time.Current <= MaxAvailableTime) { return; } Add(new KaraokeReplayFrame(Time.Current, action.Scale)); // Trigger update last frame addStateCache.Invalidate(); }
public bool OnPressed(KaraokeSaitenAction action) { // Make sure the action happened within the body of the hold note if (Time.Current < HitObject.StartTime && holdStartTime == null || Time.Current > HitObject.EndTime && holdStartTime == null) { return(false); } if (holdStartTime == null) { // User start singing this note BeginSing(); } else if (Time.Current > HitObject.EndTime || Time.Current < HitObject.StartTime) { // User stop singing this note OnReleased(action); } return(false); }
public float YPositionAt(KaraokeSaitenAction action) => - (NotePlayfield.COLUMN_SPACING + DefaultColumnBackground.COLUMN_HEIGHT) * action.Scale;