Exemplo n.º 1
0
        private void load(ISkinSource skin, TauRulesetConfigManager config)
        {
            path.Colour = skin.GetConfig <TauSkinColour, Color4>(TauSkinColour.Slider)?.Value ?? Color4.White;
            config?.BindWith(TauRulesetSettings.KiaiEffect, effect);

            Tracking.BindValueChanged(updateSlidingSample);
        }
Exemplo n.º 2
0
        private void load()
        {
            InternalChildren = new Drawable[]
            {
                Body          = new SkinnableDrawable(new OsuSkinComponent(OsuSkinComponents.SliderBody), _ => new DefaultSliderBody(), confineMode: ConfineMode.NoScaling),
                tailContainer = new Container <DrawableSliderTail> {
                    RelativeSizeAxes = Axes.Both
                },
                tickContainer = new Container <DrawableSliderTick> {
                    RelativeSizeAxes = Axes.Both
                },
                repeatContainer = new Container <DrawableSliderRepeat> {
                    RelativeSizeAxes = Axes.Both
                },
                headContainer = new Container <DrawableSliderHead> {
                    RelativeSizeAxes = Axes.Both
                },
                OverlayElementContainer = new Container {
                    RelativeSizeAxes = Axes.Both,
                },
                Ball = new SliderBall(this)
                {
                    GetInitialHitAction = () => HeadCircle.HitAction,
                    BypassAutoSizeAxes  = Axes.Both,
                    AlwaysPresent       = true,
                    Alpha = 0
                },
                slidingSample = new PausableSkinnableSound {
                    Looping = true
                }
            };

            PositionBindable.BindValueChanged(_ => Position    = HitObject.StackedPosition);
            StackHeightBindable.BindValueChanged(_ => Position = HitObject.StackedPosition);
            ScaleBindable.BindValueChanged(scale => Ball.Scale = new Vector2(scale.NewValue));

            AccentColour.BindValueChanged(colour =>
            {
                foreach (var drawableHitObject in NestedHitObjects)
                {
                    drawableHitObject.AccentColour.Value = colour.NewValue;
                }
                updateBallTint();
            }, true);

            Tracking.BindValueChanged(updateSlidingSample);
        }
Exemplo n.º 3
0
        private void load()
        {
            positionBindable.BindValueChanged(_ => Position    = HitObject.StackedPosition);
            stackHeightBindable.BindValueChanged(_ => Position = HitObject.StackedPosition);
            scaleBindable.BindValueChanged(scale => Ball.Scale = new Vector2(scale.NewValue));

            positionBindable.BindTo(HitObject.PositionBindable);
            stackHeightBindable.BindTo(HitObject.StackHeightBindable);
            scaleBindable.BindTo(HitObject.ScaleBindable);

            AccentColour.BindValueChanged(colour =>
            {
                foreach (var drawableHitObject in NestedHitObjects)
                {
                    drawableHitObject.AccentColour.Value = colour.NewValue;
                }
            }, true);

            Tracking.BindValueChanged(updateSlidingSample);
        }