mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 17:03:21 +08:00
Make hold note placement blueprints look a bit more blueprint-y
This commit is contained in:
parent
132d334e15
commit
ab0ce46362
@ -13,6 +13,9 @@ namespace osu.Game.Rulesets.Mania.Edit.Blueprints.Components
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
AccentColour = colours.Yellow;
|
||||
|
||||
Background.Alpha = 0.5f;
|
||||
Foreground.Alpha = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -19,8 +19,8 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
||||
{
|
||||
private readonly Container subtractionLayer;
|
||||
|
||||
private readonly Drawable background;
|
||||
private readonly BufferedContainer foreground;
|
||||
protected readonly Drawable Background;
|
||||
protected readonly BufferedContainer Foreground;
|
||||
private readonly BufferedContainer subtractionContainer;
|
||||
|
||||
public BodyPiece()
|
||||
@ -29,8 +29,8 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
||||
|
||||
Children = new[]
|
||||
{
|
||||
background = new Box { RelativeSizeAxes = Axes.Both },
|
||||
foreground = new BufferedContainer
|
||||
Background = new Box { RelativeSizeAxes = Axes.Both },
|
||||
Foreground = new BufferedContainer
|
||||
{
|
||||
Blending = BlendingMode.Additive,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
@ -123,7 +123,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
||||
Radius = DrawWidth
|
||||
};
|
||||
|
||||
foreground.ForceRedraw();
|
||||
Foreground.ForceRedraw();
|
||||
subtractionContainer.ForceRedraw();
|
||||
|
||||
subtractionCache.Validate();
|
||||
@ -137,18 +137,18 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
||||
if (!IsLoaded)
|
||||
return;
|
||||
|
||||
foreground.Colour = AccentColour.Opacity(0.5f);
|
||||
background.Colour = AccentColour.Opacity(0.7f);
|
||||
Foreground.Colour = AccentColour.Opacity(0.5f);
|
||||
Background.Colour = AccentColour.Opacity(0.7f);
|
||||
|
||||
const float animation_length = 50;
|
||||
|
||||
foreground.ClearTransforms(false, nameof(foreground.Colour));
|
||||
Foreground.ClearTransforms(false, nameof(Foreground.Colour));
|
||||
if (hitting)
|
||||
{
|
||||
// wait for the next sync point
|
||||
double synchronisedOffset = animation_length * 2 - Time.Current % (animation_length * 2);
|
||||
using (foreground.BeginDelayedSequence(synchronisedOffset))
|
||||
foreground.FadeColour(AccentColour.Lighten(0.2f), animation_length).Then().FadeColour(foreground.Colour, animation_length).Loop();
|
||||
using (Foreground.BeginDelayedSequence(synchronisedOffset))
|
||||
Foreground.FadeColour(AccentColour.Lighten(0.2f), animation_length).Then().FadeColour(Foreground.Colour, animation_length).Loop();
|
||||
}
|
||||
|
||||
subtractionCache.Invalidate();
|
||||
|
Loading…
Reference in New Issue
Block a user