Exemple #1
0
        public override bool Remove(DrawableHitObject h)
        {
            switch (h)
            {
            case DrawableLyric _:
                return(LyricPlayfield.Remove(h));

            case DrawableNote _:
                return(NotePlayfield.Remove(h));

            default:
                return(base.Remove(h));
            }
        }
Exemple #2
0
        public override bool Remove(HitObject h)
        {
            switch (h)
            {
            case Lyric _:
                return(LyricPlayfield.Remove(h));

            case Note _:
            case BarLine _:
                return(NotePlayfield.Remove(h));

            default:
                throw new ArgumentException($"Unsupported {nameof(HitObject)} type: {h.GetType()}");
            }
        }
        public override void Add(DrawableHitObject h)
        {
            switch (h)
            {
            case DrawableLyric _:
                LyricPlayfield.Add(h);
                break;

            case DrawableNote _:
                NotePlayfield.Add(h);

                break;

            default:
                base.Add(h);
                break;
            }
        }
        public override void Add(HitObject h)
        {
            switch (h)
            {
            case Lyric _:
                LyricPlayfield.Add(h);
                break;

            case Note _:
            case BarLine _:
                NotePlayfield.Add(h);

                break;

            default:
                throw new ArgumentException($"Unsupported {nameof(HitObject)} type: {h.GetType()}");
            }
        }
Exemple #5
0
        public override void Add(HitObject h)
        {
            switch (h)
            {
            case Lyric _:
                LyricPlayfield.Add(h);
                break;

            case Note _:
            case BarLine _:
                // hidden the note playfield until receive any note.
                NotePlayfield.Alpha = 1;
                NotePlayfield.Add(h);
                break;

            default:
                throw new ArgumentException($"Unsupported {nameof(HitObject)} type: {h.GetType()}");
            }
        }
Exemple #6
0
        public override void Add(DrawableHitObject h)
        {
            switch (h)
            {
            case DrawableLyric _:
                LyricPlayfield.Add(h);
                break;

            case DrawableNote _:
                // hidden the note playfield until receive any note.
                NotePlayfield.Alpha = 1;
                NotePlayfield.Add(h);
                break;

            default:
                base.Add(h);
                break;
            }
        }
Exemple #7
0
        public KaraokePlayfield()
        {
            AddInternal(LyricPlayfield = new LyricPlayfield
            {
                RelativeSizeAxes = Axes.Both,
            });

            AddInternal(new Container
            {
                Padding          = new MarginPadding(50),
                RelativeSizeAxes = Axes.Both,
                Child            = NotePlayfield = new NotePlayfield(9)
                {
                    Alpha            = 0,
                    RelativeSizeAxes = Axes.X
                }
            });

            AddNested(LyricPlayfield);
            AddNested(NotePlayfield);

            bindablePitch.BindValueChanged(value =>
            {
                // Convert between -10 and 10 into 0.5 and 1.5
                var newValue = 1.0f + (float)value.NewValue / 40;
                WorkingBeatmap.Track.Frequency.Value = newValue;
            });

            bindableVocalPitch.BindValueChanged(value =>
            {
                // TODO : implement until has vocal track
            });

            bindablePlayback.BindValueChanged(value =>
            {
                // Convert between -10 and 10 into 0.5 and 1.5
                var newValue = 1.0f + (float)value.NewValue / 40;
                WorkingBeatmap.Track.Tempo.Value = newValue;
            });
        }