Esempio n. 1
0
        private void load()
        {
            AddStep("Drum roll", () => SetContents(() =>
            {
                var hoc = new ScrollingHitObjectContainer();

                hoc.Add(new DrawableDrumRoll(createDrumRollAtCurrentTime())
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Width  = 500,
                });

                return(hoc);
            }));

            AddStep("Drum roll (strong)", () => SetContents(() =>
            {
                var hoc = new ScrollingHitObjectContainer();

                hoc.Add(new DrawableDrumRoll(createDrumRollAtCurrentTime(true))
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                    Width  = 500,
                });

                return(hoc);
            }));
        }
Esempio n. 2
0
        private void load()
        {
            AddStep("Bar line", () => SetContents(_ =>
            {
                ScrollingHitObjectContainer hoc;

                var cont = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.8f,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Children         = new Drawable[]
                    {
                        new TaikoPlayfield(),
                        hoc = new ScrollingHitObjectContainer()
                    }
                };

                hoc.Add(new DrawableBarLine(createBarLineAtCurrentTime())
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                });

                return(cont);
            }));

            AddStep("Bar line (major)", () => SetContents(_ =>
            {
                ScrollingHitObjectContainer hoc;

                var cont = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Height           = 0.8f,
                    Anchor           = Anchor.Centre,
                    Origin           = Anchor.Centre,
                    Children         = new Drawable[]
                    {
                        new TaikoPlayfield(),
                        hoc = new ScrollingHitObjectContainer()
                    }
                };

                hoc.Add(new DrawableBarLine(createBarLineAtCurrentTime(true))
                {
                    Anchor = Anchor.Centre,
                    Origin = Anchor.Centre,
                });

                return(cont);
            }));
        }
Esempio n. 3
0
        public override void Add(DrawableHitObject h)
        {
            switch (h)
            {
            case DrawableBarLine barline:
                barlineContainer.Add(barline);
                break;

            case DrawableTaikoHitObject taikoObject:
                h.OnNewResult += OnNewResult;
                topLevelHitContainer.Add(taikoObject.CreateProxiedContent());
                base.Add(h);
                break;

            default:
                throw new ArgumentException($"Unsupported {nameof(DrawableHitObject)} type");
            }
        }
Esempio n. 4
0
 private void addDrumRollHit(DrawableDrumRollTick drawableTick) =>
 drumRollHitContainer.Add(new DrawableFlyingHit(drawableTick));
 protected void AddHitObject(DrawableHitObject hitObject)
 => AddStep("add to SHOC", () => hitObjectContainer.Add(hitObject));