Esempio n. 1
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);
        }
Esempio n. 2
0
 public CatcherArea(BeatmapDifficulty difficulty = null)
 {
     RelativeSizeAxes = Axes.X;
     Height           = CATCHER_SIZE;
     Child            = MovableCatcher = new Catcher(difficulty)
     {
         AdditiveTarget = this,
     };
 }
Esempio n. 3
0
        public CatchPlayfield()
            : base(Axes.Y)
        {
            Container explodingFruitContainer;

            Reversed.Value = true;

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

            InternalChildren = new Drawable[]
            {
                content = new Container <Drawable>
                {
                    RelativeSizeAxes = Axes.Both,
                },
                explodingFruitContainer = new Container
                {
                    RelativeSizeAxes = Axes.Both,
                },
                catcherContainer = new Container
                {
                    RelativeSizeAxes = Axes.X,
                    Anchor           = Anchor.BottomLeft,
                    Origin           = Anchor.TopLeft,
                    Height           = 180,
                    Child            = catcher = new Catcher
                    {
                        ExplodingFruitTarget = explodingFruitContainer,
                        RelativePositionAxes = Axes.Both,
                        Origin = Anchor.TopCentre,
                        X      = 0.5f,
                    }
                }
            };
        }
Esempio n. 4
0
 private bool checkIfWeCanCatch(CatchHitObject obj) => Catcher.CanCatch(obj);