mirror of
https://github.com/ppy/osu.git
synced 2025-02-04 23:43:00 +08:00
Remove fades from DrawableJudgement itself
This commit is contained in:
parent
5bd4ace37f
commit
94886a09b2
@ -19,15 +19,14 @@ namespace osu.Game.Rulesets.Mania.UI
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override double FadeInDuration => 50;
|
|
||||||
|
|
||||||
protected override void ApplyHitAnimations()
|
protected override void ApplyHitAnimations()
|
||||||
{
|
{
|
||||||
JudgementBody.ScaleTo(0.8f);
|
JudgementBody.ScaleTo(0.8f);
|
||||||
JudgementBody.ScaleTo(1, 250, Easing.OutElastic);
|
JudgementBody.ScaleTo(1, 250, Easing.OutElastic);
|
||||||
|
|
||||||
JudgementBody.Delay(FadeInDuration).ScaleTo(0.75f, 250);
|
JudgementBody.Delay(50)
|
||||||
this.Delay(FadeInDuration).FadeOut(200);
|
.ScaleTo(0.75f, 250)
|
||||||
|
.FadeOut(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override Drawable CreateDefaultJudgement(HitResult result) => new ManiaJudgementPiece(result);
|
protected override Drawable CreateDefaultJudgement(HitResult result) => new ManiaJudgementPiece(result);
|
||||||
|
@ -44,26 +44,18 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private double fadeOutDelay;
|
|
||||||
protected override double FadeOutDelay => fadeOutDelay;
|
|
||||||
|
|
||||||
protected override void ApplyHitAnimations()
|
protected override void ApplyHitAnimations()
|
||||||
{
|
{
|
||||||
bool hitLightingEnabled = config.Get<bool>(OsuSetting.HitLighting);
|
bool hitLightingEnabled = config.Get<bool>(OsuSetting.HitLighting);
|
||||||
|
|
||||||
if (hitLightingEnabled)
|
if (hitLightingEnabled)
|
||||||
{
|
{
|
||||||
JudgementBody.FadeIn().Delay(FadeInDuration).FadeOut(400);
|
|
||||||
|
|
||||||
Lighting.ScaleTo(0.8f).ScaleTo(1.2f, 600, Easing.Out);
|
Lighting.ScaleTo(0.8f).ScaleTo(1.2f, 600, Easing.Out);
|
||||||
Lighting.FadeIn(200).Then().Delay(200).FadeOut(1000);
|
Lighting.FadeIn(200).Then().Delay(200).FadeOut(1000);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
JudgementBody.Alpha = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
fadeOutDelay = hitLightingEnabled ? 1400 : base.FadeOutDelay;
|
// extend the lifetime to cover lighting fade
|
||||||
|
LifetimeEnd = 1400;
|
||||||
|
}
|
||||||
|
|
||||||
base.ApplyHitAnimations();
|
base.ApplyHitAnimations();
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using JetBrains.Annotations;
|
using JetBrains.Annotations;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
@ -32,11 +33,13 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Duration of initial fade in.
|
/// Duration of initial fade in.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete("Apply any animations manually via ApplyHitAnimations / ApplyMissAnimations. Defaults were moved inside skinned components.")]
|
||||||
protected virtual double FadeInDuration => 100;
|
protected virtual double FadeInDuration => 100;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Duration to wait until fade out begins. Defaults to <see cref="FadeInDuration"/>.
|
/// Duration to wait until fade out begins. Defaults to <see cref="FadeInDuration"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
[Obsolete("Apply any animations manually via ApplyHitAnimations / ApplyMissAnimations. Defaults were moved inside skinned components.")]
|
||||||
protected virtual double FadeOutDelay => FadeInDuration;
|
protected virtual double FadeOutDelay => FadeInDuration;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -73,7 +76,6 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected virtual void ApplyHitAnimations()
|
protected virtual void ApplyHitAnimations()
|
||||||
{
|
{
|
||||||
this.Delay(FadeOutDelay).FadeOut(400);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -112,8 +114,6 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
// not sure if this should remain going forward.
|
// not sure if this should remain going forward.
|
||||||
skinnableJudgement.ResetAnimation();
|
skinnableJudgement.ResetAnimation();
|
||||||
|
|
||||||
this.FadeInFromZero(FadeInDuration, Easing.OutQuint);
|
|
||||||
|
|
||||||
switch (Result.Type)
|
switch (Result.Type)
|
||||||
{
|
{
|
||||||
case HitResult.None:
|
case HitResult.None:
|
||||||
@ -134,7 +134,10 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
animatable.PlayAnimation();
|
animatable.PlayAnimation();
|
||||||
}
|
}
|
||||||
|
|
||||||
Expire(true);
|
JudgementBody.Expire(true);
|
||||||
|
|
||||||
|
LifetimeStart = JudgementBody.LifetimeStart;
|
||||||
|
LifetimeEnd = JudgementBody.LifetimeEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
private HitResult? currentDrawableType;
|
private HitResult? currentDrawableType;
|
||||||
|
Loading…
Reference in New Issue
Block a user