コード例 #1
0
ファイル: DrawableNote.cs プロジェクト: littlebees/karaoke
        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();
        }
コード例 #2
0
        public void AddAction(KaraokeSaitenAction action)
        {
            if (Time.Current <= MaxAvailableTime)
            {
                return;
            }

            Add(new KaraokeReplayFrame(Time.Current, action.Scale));

            // Trigger update last frame
            addStateCache.Invalidate();
        }
コード例 #3
0
ファイル: DrawableNote.cs プロジェクト: littlebees/karaoke
        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);
        }
コード例 #4
0
 public float YPositionAt(KaraokeSaitenAction action) => - (NotePlayfield.COLUMN_SPACING + DefaultColumnBackground.COLUMN_HEIGHT) * action.Scale;