mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 18:47:27 +08: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 double animDuration;
|
||||||
|
|
||||||
private readonly ReverseArrowPiece scaleContainer;
|
private readonly Drawable scaleContainer;
|
||||||
|
|
||||||
public DrawableSliderRepeat(SliderRepeat sliderRepeat, DrawableSlider drawableSlider)
|
public DrawableSliderRepeat(SliderRepeat sliderRepeat, DrawableSlider drawableSlider)
|
||||||
: base(sliderRepeat)
|
: base(sliderRepeat)
|
||||||
@ -80,7 +80,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
this.FadeOut(animDuration, Easing.Out)
|
this.FadeOut(animDuration, Easing.Out)
|
||||||
.ScaleTo(Scale * 1.5f, animDuration, Easing.Out);
|
.ScaleTo(Scale * 1.5f, animDuration, Easing.Out);
|
||||||
scaleContainer.ShouldFollowBeats = false;
|
|
||||||
scaleContainer.Transforms.ForEach(t => scaleContainer.RemoveTransform(t));
|
scaleContainer.Transforms.ForEach(t => scaleContainer.RemoveTransform(t));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -8,12 +8,15 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Game.Beatmaps.ControlPoints;
|
using osu.Game.Beatmaps.ControlPoints;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Skinning;
|
using osu.Game.Skinning;
|
||||||
|
using osu.Framework.Allocation;
|
||||||
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
|
|
||||||
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
|
||||||
{
|
{
|
||||||
public class ReverseArrowPiece : BeatSyncedContainer
|
public class ReverseArrowPiece : BeatSyncedContainer
|
||||||
{
|
{
|
||||||
public bool ShouldFollowBeats = true;
|
[Resolved]
|
||||||
|
private DrawableHitObject drawableSlider { get; set; }
|
||||||
|
|
||||||
public ReverseArrowPiece()
|
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)
|
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);
|
Child.ScaleTo(1.3f).ScaleTo(1f, timingPoint.BeatLength, Easing.Out);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user