mirror of
https://github.com/osukey/osukey.git
synced 2025-05-19 12:37:38 +09: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)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
AccentColour = colours.Yellow;
|
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 Container subtractionLayer;
|
||||||
|
|
||||||
private readonly Drawable background;
|
protected readonly Drawable Background;
|
||||||
private readonly BufferedContainer foreground;
|
protected readonly BufferedContainer Foreground;
|
||||||
private readonly BufferedContainer subtractionContainer;
|
private readonly BufferedContainer subtractionContainer;
|
||||||
|
|
||||||
public BodyPiece()
|
public BodyPiece()
|
||||||
@ -29,8 +29,8 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
|||||||
|
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
background = new Box { RelativeSizeAxes = Axes.Both },
|
Background = new Box { RelativeSizeAxes = Axes.Both },
|
||||||
foreground = new BufferedContainer
|
Foreground = new BufferedContainer
|
||||||
{
|
{
|
||||||
Blending = BlendingMode.Additive,
|
Blending = BlendingMode.Additive,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -123,7 +123,7 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
|||||||
Radius = DrawWidth
|
Radius = DrawWidth
|
||||||
};
|
};
|
||||||
|
|
||||||
foreground.ForceRedraw();
|
Foreground.ForceRedraw();
|
||||||
subtractionContainer.ForceRedraw();
|
subtractionContainer.ForceRedraw();
|
||||||
|
|
||||||
subtractionCache.Validate();
|
subtractionCache.Validate();
|
||||||
@ -137,18 +137,18 @@ namespace osu.Game.Rulesets.Mania.Objects.Drawables.Pieces
|
|||||||
if (!IsLoaded)
|
if (!IsLoaded)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
foreground.Colour = AccentColour.Opacity(0.5f);
|
Foreground.Colour = AccentColour.Opacity(0.5f);
|
||||||
background.Colour = AccentColour.Opacity(0.7f);
|
Background.Colour = AccentColour.Opacity(0.7f);
|
||||||
|
|
||||||
const float animation_length = 50;
|
const float animation_length = 50;
|
||||||
|
|
||||||
foreground.ClearTransforms(false, nameof(foreground.Colour));
|
Foreground.ClearTransforms(false, nameof(Foreground.Colour));
|
||||||
if (hitting)
|
if (hitting)
|
||||||
{
|
{
|
||||||
// wait for the next sync point
|
// wait for the next sync point
|
||||||
double synchronisedOffset = animation_length * 2 - Time.Current % (animation_length * 2);
|
double synchronisedOffset = animation_length * 2 - Time.Current % (animation_length * 2);
|
||||||
using (foreground.BeginDelayedSequence(synchronisedOffset))
|
using (Foreground.BeginDelayedSequence(synchronisedOffset))
|
||||||
foreground.FadeColour(AccentColour.Lighten(0.2f), animation_length).Then().FadeColour(foreground.Colour, animation_length).Loop();
|
Foreground.FadeColour(AccentColour.Lighten(0.2f), animation_length).Then().FadeColour(Foreground.Colour, animation_length).Loop();
|
||||||
}
|
}
|
||||||
|
|
||||||
subtractionCache.Invalidate();
|
subtractionCache.Invalidate();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user