Make colouring for bubble more intuitive and remove unnecessary alpha assignment

This commit is contained in:
mk56-spn 2023-02-15 09:30:12 +01:00
parent 5db624159b
commit 82292d6162

View File

@ -177,8 +177,7 @@ namespace osu.Game.Rulesets.Osu.Mods
protected override void PrepareForUse()
{
Alpha = 1;
Colour = Colour4.White;
Colour = Info.IsHit ? Colour4.White : Colour4.Black;
Scale = new Vector2(1);
Position = Info.Position;
Size = Info.InitialSize;
@ -204,12 +203,8 @@ namespace osu.Game.Rulesets.Osu.Mods
content.TransformTo(nameof(BorderThickness), 2f, getAnimationDuration() * 0.3f, Easing.OutQuint)
// Avoids transparency overlap issues during the bubble "pop"
.Then().Schedule(() => content.BorderThickness = 0);
return;
}
Colour = Colour4.Black;
// The absolute length of the bubble's animation, can be used in fractions for animations of partial length
double getAnimationDuration() => 1700 + Math.Pow(Info.FadeTime, 1.07f);
}