mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Rewrite how swell circle piece is instantiated.
This commit is contained in:
@ -41,6 +41,8 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
private readonly CircularContainer targetRing;
|
||||
private readonly CircularContainer innerRing;
|
||||
|
||||
private readonly CirclePiece circlePiece;
|
||||
|
||||
private bool hasStarted;
|
||||
|
||||
public DrawableSwell(Swell swell)
|
||||
@ -107,7 +109,13 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
}
|
||||
}
|
||||
},
|
||||
new SwellCirclePiece(new CirclePiece())
|
||||
circlePiece = new CirclePiece
|
||||
{
|
||||
Children = new []
|
||||
{
|
||||
new SwellSymbolPiece()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@ -116,6 +124,7 @@ namespace osu.Game.Modes.Taiko.Objects.Drawable
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
circlePiece.AccentColour = colours.YellowDark;
|
||||
innerRing.Colour = colours.YellowDark;
|
||||
targetRing.BorderColour = colours.YellowDark.Opacity(0.25f);
|
||||
}
|
||||
|
@ -1,35 +0,0 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
|
||||
{
|
||||
public class SwellCirclePiece : Container
|
||||
{
|
||||
private readonly CirclePiece circle;
|
||||
|
||||
public SwellCirclePiece(CirclePiece piece)
|
||||
{
|
||||
Add(circle = piece);
|
||||
|
||||
circle.Add(new TextAwesome
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
TextSize = CirclePiece.SYMBOL_INNER_SIZE,
|
||||
Icon = FontAwesome.fa_asterisk,
|
||||
Shadow = false
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
circle.AccentColour = colours.YellowDark;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Game.Graphics;
|
||||
using osu.Framework.Graphics;
|
||||
|
||||
namespace osu.Game.Modes.Taiko.Objects.Drawable.Pieces
|
||||
{
|
||||
/// <summary>
|
||||
/// The symbol used for swell pieces.
|
||||
/// </summary>
|
||||
public class SwellSymbolPiece : TextAwesome
|
||||
{
|
||||
public SwellSymbolPiece()
|
||||
{
|
||||
Anchor = Anchor.Centre;
|
||||
Origin = Anchor.Centre;
|
||||
TextSize = CirclePiece.SYMBOL_INNER_SIZE;
|
||||
Icon = FontAwesome.fa_asterisk;
|
||||
Shadow = false;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user