public EditorNotePlayfield(int columns)
            : base(columns)
        {
            BackgroundLayer.AddRange(new Drawable[]
            {
                new Box
                {
                    Depth            = 1,
                    Name             = "Background",
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Color4.Black,
                    Alpha            = 0.5f
                },
            });

            HitObjectArea.Add(singerVoiceVisualization = new SingerVoiceVisualization
            {
                Name             = "Saiten Visualization",
                RelativeSizeAxes = Axes.Both,
                Alpha            = 0.6f
            });
        }
Example #2
0
        internal void OnNewResult(DrawableHitObject judgedObject, JudgementResult result)
        {
            // Add judgement
            if (!judgedObject.DisplayResult || !DisplayJudgements.Value)
            {
                return;
            }

            if (!(judgedObject is DrawableNote note))
            {
                return;
            }

            judgements.Clear();
            judgements.Add(new DrawableNoteJudgement(result, judgedObject)
            {
                Anchor = Anchor.Centre,
                Origin = Anchor.Centre,
                Y      = Calculator.YPositionAt(note.HitObject.Tone + 2)
            });

            // Add hit explosion
            if (!result.IsHit)
            {
                return;
            }

            var explosion = new SkinnableDrawable(new KaraokeSkinComponent(KaraokeSkinComponents.HitExplosion), _ =>
                                                  new DefaultHitExplosion(judgedObject.AccentColour.Value, judgedObject is DrawableNote))
            {
                Y = Calculator.YPositionAt(note.HitObject.Tone)
            };

            // todo : should be added into hitObjectArea.Explosions
            // see how mania ruleset do
            HitObjectArea.Add(explosion);

            explosion.Delay(200).Expire(true);
        }
Example #3
0
        public NotePlayfield(int columns)
            : base(columns)
        {
            if (InternalChildren.FirstOrDefault() is Container container)
            {
                // add padding to first children.
                container.Padding = new MarginPadding {
                    Top = 30, Bottom = 30
                };
            }

            BackgroundLayer.AddRange(new Drawable[]
            {
                new SkinnableDrawable(new KaraokeSkinComponent(KaraokeSkinComponents.StageBackground), _ => null)
                {
                    Depth            = 2,
                    RelativeSizeAxes = Axes.Both
                },
                new Box
                {
                    Depth            = 1,
                    Name             = "Background",
                    RelativeSizeAxes = Axes.Both,
                    Colour           = Color4.Black,
                    Alpha            = 0.5f
                },
                centerLine = new CenterLine
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                }
            });

            HitObjectLayer.Add(judgementArea = new Container
            {
                RelativeSizeAxes     = Axes.Both,
                RelativePositionAxes = Axes.X,
                Children             = new[]
                {
                    judgements = new JudgementContainer <DrawableNoteJudgement>
                    {
                        Anchor             = Anchor.CentreLeft,
                        Origin             = Anchor.CentreLeft,
                        AutoSizeAxes       = Axes.Both,
                        BypassAutoSizeAxes = Axes.Both
                    },
                    judgementLine = new SkinnableDrawable(new KaraokeSkinComponent(KaraokeSkinComponents.JudgementLine), _ => new DefaultJudgementLine())
                    {
                        RelativeSizeAxes = Axes.Y,
                        Anchor           = Anchor.Centre,
                        Origin           = Anchor.Centre,
                    },
                    saitenMarker = new SaitenMarker
                    {
                        Alpha = 0
                    }
                }
            });

            HitObjectArea.AddRange(new Drawable[]
            {
                // todo : generate this only if in auto-play mode.
                replaySaitenVisualization = new ReplaySaitenVisualization(null)
                {
                    Name             = "Saiten Visualization",
                    RelativeSizeAxes = Axes.Both,
                    Alpha            = 0.6f
                },
                realTimeSaitenVisualization = new RealTimeSaitenVisualization
                {
                    Name             = "Saiten Visualization",
                    RelativeSizeAxes = Axes.Both,
                },
            });

            AddInternal(saitenStatus = new SaitenStatus(SaitenStatusMode.NotInitialized));
        }