mirror of
https://github.com/ppy/osu
synced 2024-12-15 19:36:34 +00:00
Use DI instead
This commit is contained in:
parent
1f6a4fa4b8
commit
a3626333be
@ -22,7 +22,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
|
||||
private double animDuration;
|
||||
|
||||
private readonly ReverseArrowPiece scaleContainer;
|
||||
private readonly Drawable scaleContainer;
|
||||
|
||||
public DrawableSliderRepeat(SliderRepeat sliderRepeat, DrawableSlider drawableSlider)
|
||||
: base(sliderRepeat)
|
||||
@ -80,7 +80,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
||||
case ArmedState.Hit:
|
||||
this.FadeOut(animDuration, Easing.Out)
|
||||
.ScaleTo(Scale * 1.5f, animDuration, Easing.Out);
|
||||
scaleContainer.ShouldFollowBeats = false;
|
||||
scaleContainer.Transforms.ForEach(t => scaleContainer.RemoveTransform(t));
|
||||
break;
|
||||
}
|
||||
|
@ -8,12 +8,15 @@ using osu.Framework.Graphics.Sprites;
|
||||
using osu.Game.Beatmaps.ControlPoints;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
{
|
||||
public class ReverseArrowPiece : BeatSyncedContainer
|
||||
{
|
||||
public bool ShouldFollowBeats = true;
|
||||
[Resolved]
|
||||
private DrawableHitObject drawableSlider { get; set; }
|
||||
|
||||
public ReverseArrowPiece()
|
||||
{
|
||||
@ -41,7 +44,7 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||
|
||||
protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint, EffectControlPoint effectPoint, TrackAmplitudes amplitudes)
|
||||
{
|
||||
if (ShouldFollowBeats)
|
||||
if (!drawableSlider.IsHit)
|
||||
Child.ScaleTo(1.3f).ScaleTo(1f, timingPoint.BeatLength, Easing.Out);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user