Exemplo n.º 1
0
        public Column(int index)
        {
            Index = index;

            RelativeSizeAxes = Axes.Y;
            Width            = COLUMN_WIDTH;

            Drawable background = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.ColumnBackground), _ => new DefaultColumnBackground())
            {
                RelativeSizeAxes = Axes.Both
            };

            InternalChildren = new[]
            {
                // For input purposes, the background is added at the highest depth, but is then proxied back below all other elements
                background.CreateProxy(),
                    hitObjectArea = new ColumnHitObjectArea(HitObjectContainer)
                {
                    RelativeSizeAxes = Axes.Both
                },
                new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.KeyArea), _ => new DefaultKeyArea())
                {
                    RelativeSizeAxes = Axes.Both
                },
                background,
                TopLevelContainer = new Container {
                    RelativeSizeAxes = Axes.Both
                }
            };

            TopLevelContainer.Add(hitObjectArea.Explosions.CreateProxy());
        }
Exemplo n.º 2
0
        public DrawableHoldNote(HoldNote hitObject)
            : base(hitObject)
        {
            RelativeSizeAxes = Axes.X;

            Container maskedContents;

            AddRangeInternal(new Drawable[]
            {
                sizingContainer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                    Children         = new Drawable[]
                    {
                        maskingContainer = new Container
                        {
                            RelativeSizeAxes = Axes.Both,
                            Child            = maskedContents = new Container
                            {
                                RelativeSizeAxes = Axes.Both,
                                Masking          = true,
                            }
                        },
                        headContainer = new Container <DrawableHoldNoteHead> {
                            RelativeSizeAxes = Axes.Both
                        }
                    }
                },
                bodyPiece = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.HoldNoteBody, hitObject.Column), _ => new DefaultBodyPiece
                {
                    RelativeSizeAxes = Axes.Both,
                })
                {
                    RelativeSizeAxes = Axes.X
                },
                tickContainer = new Container <DrawableHoldNoteTick> {
                    RelativeSizeAxes = Axes.Both
                },
                tailContainer = new Container <DrawableHoldNoteTail> {
                    RelativeSizeAxes = Axes.Both
                },
            });

            maskedContents.AddRange(new[]
            {
                bodyPiece.CreateProxy(),
                tickContainer.CreateProxy(),
                tailContainer.CreateProxy(),
            });
        }
Exemplo n.º 3
0
        public Column(int index)
        {
            Index = index;

            RelativeSizeAxes = Axes.Y;
            Width            = COLUMN_WIDTH;

            Drawable background = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.ColumnBackground), _ => new DefaultColumnBackground())
            {
                RelativeSizeAxes = Axes.Both
            };

            InternalChildren = new[]
            {
                hitExplosionPool = new DrawablePool <PoolableHitExplosion>(5),
                // For input purposes, the background is added at the highest depth, but is then proxied back below all other elements
                background.CreateProxy(),
                HitObjectArea = new ColumnHitObjectArea(Index, HitObjectContainer)
                {
                    RelativeSizeAxes = Axes.Both
                },
                new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.KeyArea), _ => new DefaultKeyArea())
                {
                    RelativeSizeAxes = Axes.Both
                },
                background,
                hitSounds = new Container <SkinnableSound>
                {
                    Name             = "Column samples pool",
                    RelativeSizeAxes = Axes.Both,
                    Children         = Enumerable.Range(0, max_concurrent_hitsounds).Select(_ => new SkinnableSound()).ToArray()
                },
                TopLevelContainer = new Container {
                    RelativeSizeAxes = Axes.Both
                }
            };

            hitPolicy = new OrderedHitPolicy(HitObjectContainer);

            TopLevelContainer.Add(HitObjectArea.Explosions.CreateProxy());

            RegisterPool <Note, DrawableNote>(10, 50);
            RegisterPool <HoldNote, DrawableHoldNote>(10, 50);
            RegisterPool <HeadNote, DrawableHoldNoteHead>(10, 50);
            RegisterPool <TailNote, DrawableHoldNoteTail>(10, 50);
            RegisterPool <HoldNoteTick, DrawableHoldNoteTick>(50, 250);
        }
Exemplo n.º 4
0
        public Column(int index)
        {
            Index = index;

            RelativeSizeAxes = Axes.Y;
            Width            = COLUMN_WIDTH;

            Drawable background = new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.ColumnBackground), _ => new DefaultColumnBackground())
            {
                RelativeSizeAxes = Axes.Both
            };

            InternalChildren = new[]
            {
                hitExplosionPool    = new DrawablePool <PoolableHitExplosion>(5),
                sampleTriggerSource = new GameplaySampleTriggerSource(HitObjectContainer),
                // For input purposes, the background is added at the highest depth, but is then proxied back below all other elements
                background.CreateProxy(),
                HitObjectArea = new ColumnHitObjectArea(HitObjectContainer)
                {
                    RelativeSizeAxes = Axes.Both
                },
                new SkinnableDrawable(new ManiaSkinComponent(ManiaSkinComponents.KeyArea), _ => new DefaultKeyArea())
                {
                    RelativeSizeAxes = Axes.Both
                },
                background,
                TopLevelContainer = new Container {
                    RelativeSizeAxes = Axes.Both
                },
                new ColumnTouchInputArea(this)
            };

            hitPolicy = new OrderedHitPolicy(HitObjectContainer);

            TopLevelContainer.Add(HitObjectArea.Explosions.CreateProxy());

            RegisterPool <Note, DrawableNote>(10, 50);
            RegisterPool <HoldNote, DrawableHoldNote>(10, 50);
            RegisterPool <HeadNote, DrawableHoldNoteHead>(10, 50);
            RegisterPool <TailNote, DrawableHoldNoteTail>(10, 50);
            RegisterPool <HoldNoteTick, DrawableHoldNoteTick>(50, 250);
        }