Exemple #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());
        }
Exemple #2
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);
        }
Exemple #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),
                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);
        }