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 } }; }
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); }
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); }
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; }
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, }; }
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 }; }
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, }; }
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, }; }