예제 #1
0
        private void load(OsuColour colours)
        {
            InternalChildren = new[]
            {
                new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.PlayfieldBackgroundRight), _ => new PlayfieldBackgroundRight()),
                rightArea = new Container
                {
                    Name                 = "Right area",
                    RelativeSizeAxes     = Axes.Both,
                    RelativePositionAxes = Axes.Both,
                    Children             = new Drawable[]
                    {
                        new Container
                        {
                            Name             = "Masked elements before hit objects",
                            RelativeSizeAxes = Axes.Both,
                            FillMode         = FillMode.Fit,
                            Children         = new[]
                            {
                                hitExplosionContainer = new Container <HitExplosion>
                                {
                                    RelativeSizeAxes = Axes.Both,
                                },
                                HitTarget = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.HitTarget), _ => new TaikoHitTarget())
                                {
                                    RelativeSizeAxes = Axes.Both,
                                }
                            }
                        },
                        hitTargetOffsetContent = new Container
                        {
                            RelativeSizeAxes = Axes.Both,
                            Children         = new Drawable[]
                            {
                                barLinePlayfield = new BarLinePlayfield(),
                                new Container
                                {
                                    Name             = "Hit objects",
                                    RelativeSizeAxes = Axes.Both,
                                    Children         = new Drawable[]
                                    {
                                        HitObjectContainer,
                                        drumRollHitContainer = new DrumRollHitContainer()
                                    }
                                },
                                kiaiExplosionContainer = new Container <KiaiHitExplosion>
                                {
                                    Name             = "Kiai hit explosions",
                                    RelativeSizeAxes = Axes.Both,
                                    FillMode         = FillMode.Fit,
                                },
                                judgementContainer = new JudgementContainer <DrawableTaikoJudgement>
                                {
                                    Name             = "Judgements",
                                    RelativeSizeAxes = Axes.Y,
                                },
                            }
                        },
                    }
                },
                leftArea = new Container
                {
                    Name             = "Left overlay",
                    RelativeSizeAxes = Axes.Both,
                    FillMode         = FillMode.Fit,
                    BorderColour     = colours.Gray0,
                    Children         = new Drawable[]
                    {
                        new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.PlayfieldBackgroundLeft), _ => new PlayfieldBackgroundLeft()),
                        new InputDrum(HitObjectContainer)
                        {
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreLeft,
                        },
                    }
                },
                mascot = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.Mascot), _ => Empty())
                {
                    Origin = Anchor.BottomLeft,
                    Anchor = Anchor.TopLeft,
                    RelativePositionAxes = Axes.Y,
                    RelativeSizeAxes     = Axes.None,
                    Y = 0.2f
                },
                topLevelHitContainer = new ProxyContainer
                {
                    Name             = "Top level hit objects",
                    RelativeSizeAxes = Axes.Both,
                },
                drumRollHitContainer.CreateProxy(),
            };

            RegisterPool <Hit, DrawableHit>(50);
            RegisterPool <Hit.StrongNestedHit, DrawableHit.StrongNestedHit>(50);

            RegisterPool <DrumRoll, DrawableDrumRoll>(5);
            RegisterPool <DrumRoll.StrongNestedHit, DrawableDrumRoll.StrongNestedHit>(5);

            RegisterPool <DrumRollTick, DrawableDrumRollTick>(100);
            RegisterPool <DrumRollTick.StrongNestedHit, DrawableDrumRollTick.StrongNestedHit>(100);

            RegisterPool <Swell, DrawableSwell>(5);
            RegisterPool <SwellTick, DrawableSwellTick>(100);

            var hitWindows = new TaikoHitWindows();

            foreach (var result in Enum.GetValues(typeof(HitResult)).OfType <HitResult>().Where(r => hitWindows.IsHitResultAllowed(r)))
            {
                judgementPools.Add(result, new DrawablePool <DrawableTaikoJudgement>(15));
                explosionPools.Add(result, new HitExplosionPool(result));
            }

            AddRangeInternal(judgementPools.Values);
            AddRangeInternal(explosionPools.Values);
        }
예제 #2
0
        private void load(OsuColour colours)
        {
            InternalChildren = new[]
            {
                new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.PlayfieldBackgroundRight), _ => new PlayfieldBackgroundRight()),
                rightArea = new Container
                {
                    Name                 = "Right area",
                    RelativeSizeAxes     = Axes.Both,
                    RelativePositionAxes = Axes.Both,
                    Children             = new Drawable[]
                    {
                        new Container
                        {
                            Name             = "Masked elements before hit objects",
                            RelativeSizeAxes = Axes.Both,
                            FillMode         = FillMode.Fit,
                            Children         = new[]
                            {
                                hitExplosionContainer = new Container <HitExplosion>
                                {
                                    RelativeSizeAxes = Axes.Both,
                                },
                                HitTarget = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.HitTarget), _ => new TaikoHitTarget())
                                {
                                    RelativeSizeAxes = Axes.Both,
                                }
                            }
                        },
                        hitTargetOffsetContent = new Container
                        {
                            RelativeSizeAxes = Axes.Both,
                            Children         = new Drawable[]
                            {
                                barLinePlayfield = new BarLinePlayfield(),
                                new Container
                                {
                                    Name             = "Hit objects",
                                    RelativeSizeAxes = Axes.Both,
                                    Children         = new Drawable[]
                                    {
                                        HitObjectContainer,
                                        drumRollHitContainer = new DrumRollHitContainer()
                                    }
                                },
                                kiaiExplosionContainer = new Container <KiaiHitExplosion>
                                {
                                    Name             = "Kiai hit explosions",
                                    RelativeSizeAxes = Axes.Both,
                                    FillMode         = FillMode.Fit,
                                },
                                judgementContainer = new JudgementContainer <DrawableTaikoJudgement>
                                {
                                    Name             = "Judgements",
                                    RelativeSizeAxes = Axes.Y,
                                },
                            }
                        },
                    }
                },
                leftArea = new Container
                {
                    Name             = "Left overlay",
                    RelativeSizeAxes = Axes.Both,
                    FillMode         = FillMode.Fit,
                    BorderColour     = colours.Gray0,
                    Children         = new Drawable[]
                    {
                        new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.PlayfieldBackgroundLeft), _ => new PlayfieldBackgroundLeft()),
                        new InputDrum(controlPoints)
                        {
                            Anchor = Anchor.CentreLeft,
                            Origin = Anchor.CentreLeft,
                        },
                    }
                },
                mascot = new SkinnableDrawable(new TaikoSkinComponent(TaikoSkinComponents.Mascot), _ => Empty())
                {
                    Origin = Anchor.BottomLeft,
                    Anchor = Anchor.TopLeft,
                    RelativePositionAxes = Axes.Y,
                    RelativeSizeAxes     = Axes.None,
                    Y = 0.2f
                },
                topLevelHitContainer = new ProxyContainer
                {
                    Name             = "Top level hit objects",
                    RelativeSizeAxes = Axes.Both,
                },
                drumRollHitContainer.CreateProxy(),
            };

            RegisterPool <Hit, DrawableHit>(50);
            RegisterPool <Hit.StrongNestedHit, DrawableHit.StrongNestedHit>(50);

            RegisterPool <DrumRoll, DrawableDrumRoll>(5);
            RegisterPool <DrumRoll.StrongNestedHit, DrawableDrumRoll.StrongNestedHit>(5);

            RegisterPool <DrumRollTick, DrawableDrumRollTick>(100);
            RegisterPool <DrumRollTick.StrongNestedHit, DrawableDrumRollTick.StrongNestedHit>(100);

            RegisterPool <Swell, DrawableSwell>(5);
            RegisterPool <SwellTick, DrawableSwellTick>(100);
        }