Ejemplo n.º 1
0
        public CatchPlayfield(BeatmapDifficulty difficulty, Func <CatchHitObject, DrawableHitObject <CatchHitObject> > getVisualRepresentation)
        {
            Container explodingFruitContainer;

            Anchor = Anchor.TopCentre;
            Origin = Anchor.TopCentre;

            Size = new Vector2(0.86f); // matches stable's vertical offset for catcher plate

            InternalChild = new PlayfieldAdjustmentContainer
            {
                RelativeSizeAxes = Axes.Both,
                Children         = new Drawable[]
                {
                    explodingFruitContainer = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                    },
                    catcherArea = new CatcherArea(difficulty)
                    {
                        GetVisualRepresentation = getVisualRepresentation,
                        ExplodingFruitTarget    = explodingFruitContainer,
                        Anchor = Anchor.BottomLeft,
                        Origin = Anchor.TopLeft,
                    },
                    HitObjectContainer
                }
            };
        }
Ejemplo n.º 2
0
        private void load()
        {
            var droppedObjectContainer = new DroppedObjectContainer();

            Catcher = new Catcher(droppedObjectContainer, difficulty)
            {
                X = CENTER_X
            };

            AddRangeInternal(new[]
            {
                droppedObjectContainer,
                Catcher.CreateProxiedContent(),
                HitObjectContainer.CreateProxy(),
                // This ordering (`CatcherArea` before `HitObjectContainer`) is important to
                // make sure the up-to-date catcher position is used for the catcher catching logic of hit objects.
                CatcherArea = new CatcherArea
                {
                    Anchor  = Anchor.BottomLeft,
                    Origin  = Anchor.TopLeft,
                    Catcher = Catcher,
                },
                HitObjectContainer,
            });

            RegisterPool <Droplet, DrawableDroplet>(50);
            RegisterPool <TinyDroplet, DrawableTinyDroplet>(50);
            RegisterPool <Fruit, DrawableFruit>(100);
            RegisterPool <Banana, DrawableBanana>(100);
            RegisterPool <JuiceStream, DrawableJuiceStream>(10);
            RegisterPool <BananaShower, DrawableBananaShower>(2);
        }
Ejemplo n.º 3
0
        public CatchPlayfield(BeatmapDifficulty difficulty, Func <CatchHitObject, DrawableHitObject <CatchHitObject> > getVisualRepresentation)
        {
            Direction.Value = ScrollingDirection.Down;

            Container explodingFruitContainer;

            Anchor = Anchor.TopCentre;
            Origin = Anchor.TopCentre;

            Size = new Vector2(0.86f); // matches stable's vertical offset for catcher plate

            InternalChild = new PlayfieldAdjustmentContainer
            {
                RelativeSizeAxes = Axes.Both,
                Children         = new Drawable[]
                {
                    explodingFruitContainer = new Container
                    {
                        RelativeSizeAxes = Axes.Both,
                    },
                    catcherArea = new CatcherArea(difficulty)
                    {
                        GetVisualRepresentation = getVisualRepresentation,
                        ExplodingFruitTarget    = explodingFruitContainer,
                        Anchor = Anchor.BottomLeft,
                        Origin = Anchor.TopLeft,
                    },
                    HitObjectContainer
                }
            };

            VisibleTimeRange.Value = BeatmapDifficulty.DifficultyRange(difficulty.ApproachRate, 1800, 1200, 450);
        }
Ejemplo n.º 4
0
        public CatchPlayfield(BeatmapDifficulty difficulty, Func <CatchHitObject, DrawableHitObject <CatchHitObject> > createDrawableRepresentation)
        {
            var explodingFruitContainer = new Container
            {
                RelativeSizeAxes = Axes.Both,
            };

            CatcherArea = new CatcherArea(difficulty)
            {
                CreateDrawableRepresentation = createDrawableRepresentation,
                ExplodingFruitTarget         = explodingFruitContainer,
                Anchor = Anchor.BottomLeft,
                Origin = Anchor.TopLeft,
            };

            InternalChildren = new[]
            {
                explodingFruitContainer,
                CatcherArea.MovableCatcher.CreateProxiedContent(),
                HitObjectContainer,
                CatcherArea,
            };

            NewResult    += onNewResult;
            RevertResult += onRevertResult;
        }
Ejemplo n.º 5
0
        public CatchPlayfield(BeatmapDifficulty difficulty)
        {
            CatcherArea = new CatcherArea(difficulty)
            {
                Anchor = Anchor.BottomLeft,
                Origin = Anchor.TopLeft,
            };

            InternalChildren = new[]
            {
                droppedObjectContainer = new DroppedObjectContainer(),
                CatcherArea.MovableCatcher.CreateProxiedContent(),
                HitObjectContainer.CreateProxy(),
                // This ordering (`CatcherArea` before `HitObjectContainer`) is important to
                // make sure the up-to-date catcher position is used for the catcher catching logic of hit objects.
                CatcherArea,
                HitObjectContainer,
            };
        }
Ejemplo n.º 6
0
        public CatchPlayfield(BeatmapDifficulty difficulty, Func <CatchHitObject, DrawableHitObject <CatchHitObject> > createDrawableRepresentation)
        {
            Container explodingFruitContainer;

            InternalChildren = new Drawable[]
            {
                explodingFruitContainer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                },
                CatcherArea = new CatcherArea(difficulty)
                {
                    CreateDrawableRepresentation = createDrawableRepresentation,
                    ExplodingFruitTarget         = explodingFruitContainer,
                    Anchor = Anchor.BottomLeft,
                    Origin = Anchor.TopLeft,
                },
                HitObjectContainer
            };
        }
Ejemplo n.º 7
0
        public CatchPlayfield(BeatmapDifficulty difficulty, Func <CatchHitObject, DrawableHitObject <CatchHitObject> > createDrawableRepresentation)
        {
            var droppedObjectContainer = new Container
            {
                RelativeSizeAxes = Axes.Both,
            };

            CatcherArea = new CatcherArea(droppedObjectContainer, difficulty)
            {
                Anchor = Anchor.BottomLeft,
                Origin = Anchor.TopLeft,
            };

            InternalChildren = new[]
            {
                droppedObjectContainer,
                CatcherArea.MovableCatcher.CreateProxiedContent(),
                HitObjectContainer,
                CatcherArea,
            };
        }
Ejemplo n.º 8
0
        public CatchPlayfield(BeatmapDifficulty difficulty, Func <CatchHitObject, DrawableHitObject <CatchHitObject> > createDrawableRepresentation)
        {
            var droppedObjectContainer = new Container <CaughtObject>
            {
                RelativeSizeAxes = Axes.Both,
            };

            CatcherArea = new CatcherArea(droppedObjectContainer, difficulty)
            {
                Anchor = Anchor.BottomLeft,
                Origin = Anchor.TopLeft,
            };

            InternalChildren = new[]
            {
                droppedObjectContainer,
                CatcherArea.MovableCatcher.CreateProxiedContent(),
                HitObjectContainer.CreateProxy(),
                // This ordering (`CatcherArea` before `HitObjectContainer`) is important to
                // make sure the up-to-date catcher position is used for the catcher catching logic of hit objects.
                CatcherArea,
                HitObjectContainer,
            };
        }