mirror of
https://github.com/ppy/osu.git
synced 2025-02-11 00:43:12 +08:00
Fix fade not applying to tails sometimes
This commit is contained in:
parent
55a91dbbe0
commit
4777b1be81
@ -118,21 +118,22 @@ namespace osu.Game.Rulesets.Mania.Skinning
|
|||||||
|
|
||||||
private void applyCustomUpdateState(DrawableHitObject hitObject, ArmedState state)
|
private void applyCustomUpdateState(DrawableHitObject hitObject, ArmedState state)
|
||||||
{
|
{
|
||||||
switch (state)
|
if (state == ArmedState.Miss)
|
||||||
|
missFadeTime = hitObject.StateUpdateTime;
|
||||||
|
|
||||||
|
if (missFadeTime == null)
|
||||||
|
return;
|
||||||
|
|
||||||
|
// this state update could come from any nested object of the hold note.
|
||||||
|
// make sure the transforms are consistent across all affected parts
|
||||||
|
// even if they're idle.
|
||||||
|
using (BeginAbsoluteSequence(missFadeTime.Value))
|
||||||
{
|
{
|
||||||
case ArmedState.Miss:
|
// colour and duration matches stable
|
||||||
missFadeTime ??= hitObject.StateUpdateTime;
|
// transforms not applied to entire hold note in order to not affect hit lighting
|
||||||
|
holdNote.Head.FadeColour(Colour4.DarkGray, 60);
|
||||||
using (BeginAbsoluteSequence(missFadeTime.Value))
|
bodySprite?.FadeColour(Colour4.DarkGray, 60);
|
||||||
{
|
holdNote.Tail.FadeColour(Colour4.DarkGray, 60);
|
||||||
// colour and duration matches stable
|
|
||||||
// transforms not applied to entire hold note in order to not affect hit lighting
|
|
||||||
holdNote.Head.FadeColour(Colour4.DarkGray, 60);
|
|
||||||
bodySprite?.FadeColour(Colour4.DarkGray, 60);
|
|
||||||
holdNote.Tail.FadeColour(Colour4.DarkGray, 60);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user