mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 05:52:55 +08:00
Merge branch 'master' into solo-score-submission
This commit is contained in:
commit
217f6083ca
@ -164,28 +164,29 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
ApproachCircle.Expire(true);
|
ApproachCircle.Expire(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void UpdateStartTimeStateTransforms()
|
||||||
|
{
|
||||||
|
base.UpdateStartTimeStateTransforms();
|
||||||
|
|
||||||
|
ApproachCircle.FadeOut(50);
|
||||||
|
}
|
||||||
|
|
||||||
protected override void UpdateHitStateTransforms(ArmedState state)
|
protected override void UpdateHitStateTransforms(ArmedState state)
|
||||||
{
|
{
|
||||||
Debug.Assert(HitObject.HitWindows != null);
|
Debug.Assert(HitObject.HitWindows != null);
|
||||||
|
|
||||||
|
// todo: temporary / arbitrary, used for lifetime optimisation.
|
||||||
|
this.Delay(800).FadeOut();
|
||||||
|
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case ArmedState.Idle:
|
case ArmedState.Idle:
|
||||||
this.Delay(HitObject.TimePreempt).FadeOut(500);
|
|
||||||
HitArea.HitAction = null;
|
HitArea.HitAction = null;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Miss:
|
case ArmedState.Miss:
|
||||||
ApproachCircle.FadeOut(50);
|
|
||||||
this.FadeOut(100);
|
this.FadeOut(100);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ArmedState.Hit:
|
|
||||||
ApproachCircle.FadeOut(50);
|
|
||||||
|
|
||||||
// todo: temporary / arbitrary
|
|
||||||
this.Delay(800).FadeOut();
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire();
|
Expire();
|
||||||
|
@ -39,6 +39,8 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
private Bindable<bool> isSpinning;
|
private Bindable<bool> isSpinning;
|
||||||
private bool spinnerFrequencyModulate;
|
private bool spinnerFrequencyModulate;
|
||||||
|
|
||||||
|
private const double fade_out_duration = 160;
|
||||||
|
|
||||||
public DrawableSpinner()
|
public DrawableSpinner()
|
||||||
: this(null)
|
: this(null)
|
||||||
{
|
{
|
||||||
@ -131,12 +133,13 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
if (tracking.NewValue)
|
if (tracking.NewValue)
|
||||||
{
|
{
|
||||||
if (!spinningSample.IsPlaying)
|
if (!spinningSample.IsPlaying)
|
||||||
spinningSample?.Play();
|
spinningSample.Play();
|
||||||
spinningSample?.VolumeTo(1, 300);
|
|
||||||
|
spinningSample.VolumeTo(1, 300);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
spinningSample?.VolumeTo(0, 300).OnComplete(_ => spinningSample.Stop());
|
spinningSample.VolumeTo(0, fade_out_duration);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -173,7 +176,14 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
{
|
{
|
||||||
base.UpdateHitStateTransforms(state);
|
base.UpdateHitStateTransforms(state);
|
||||||
|
|
||||||
this.FadeOut(160).Expire();
|
this.FadeOut(fade_out_duration).OnComplete(_ =>
|
||||||
|
{
|
||||||
|
// looping sample should be stopped here as it is safer than running in the OnComplete
|
||||||
|
// of the volume transition above.
|
||||||
|
spinningSample.Stop();
|
||||||
|
});
|
||||||
|
|
||||||
|
Expire();
|
||||||
|
|
||||||
// skin change does a rewind of transforms, which will stop the spinning sound from playing if it's currently in playback.
|
// skin change does a rewind of transforms, which will stop the spinning sound from playing if it's currently in playback.
|
||||||
isSpinning?.TriggerChange();
|
isSpinning?.TriggerChange();
|
||||||
|
@ -74,10 +74,11 @@ namespace osu.Game.Rulesets.Osu.Skinning.Default
|
|||||||
|
|
||||||
private void updateState(DrawableHitObject drawableObject, ArmedState state)
|
private void updateState(DrawableHitObject drawableObject, ArmedState state)
|
||||||
{
|
{
|
||||||
using (BeginAbsoluteSequence(drawableObject.HitStateUpdateTime, true))
|
using (BeginAbsoluteSequence(drawableObject.StateUpdateTime))
|
||||||
{
|
|
||||||
glow.FadeOut(400);
|
glow.FadeOut(400);
|
||||||
|
|
||||||
|
using (BeginAbsoluteSequence(drawableObject.HitStateUpdateTime))
|
||||||
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case ArmedState.Hit:
|
case ArmedState.Hit:
|
||||||
|
Loading…
Reference in New Issue
Block a user