mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Merge branch 'master' into taiko_swell_drawing
This commit is contained in:
@ -6,10 +6,8 @@ using OpenTK.Graphics;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Modes.Taiko.Objects;
|
||||
using osu.Game.Modes.Taiko.Objects.Drawable.Pieces;
|
||||
|
||||
namespace osu.Desktop.VisualTests.Tests
|
||||
@ -30,36 +28,52 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Reset();
|
||||
});
|
||||
|
||||
Add(new CentreHitCircle(new CirclePiece()
|
||||
Add(new CirclePiece
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
{
|
||||
Position = new Vector2(100, 100)
|
||||
Position = new Vector2(100, 100),
|
||||
Width = 0,
|
||||
AccentColour = Color4.DarkRed,
|
||||
KiaiMode = kiai,
|
||||
Children = new[]
|
||||
{
|
||||
new CentreHitSymbolPiece()
|
||||
}
|
||||
});
|
||||
|
||||
Add(new CentreHitCircle(new StrongCirclePiece()
|
||||
Add(new StrongCirclePiece
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
{
|
||||
Position = new Vector2(350, 100)
|
||||
Position = new Vector2(350, 100),
|
||||
Width = 0,
|
||||
AccentColour = Color4.DarkRed,
|
||||
KiaiMode = kiai,
|
||||
Children = new[]
|
||||
{
|
||||
new CentreHitSymbolPiece()
|
||||
}
|
||||
});
|
||||
|
||||
Add(new RimHitCircle(new CirclePiece()
|
||||
Add(new CirclePiece
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
{
|
||||
Position = new Vector2(100, 300)
|
||||
Position = new Vector2(100, 300),
|
||||
Width = 0,
|
||||
AccentColour = Color4.DarkBlue,
|
||||
KiaiMode = kiai,
|
||||
Children = new[]
|
||||
{
|
||||
new RimHitSymbolPiece()
|
||||
}
|
||||
});
|
||||
|
||||
Add(new RimHitCircle(new StrongCirclePiece()
|
||||
Add(new StrongCirclePiece
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
{
|
||||
Position = new Vector2(350, 300)
|
||||
Position = new Vector2(350, 300),
|
||||
Width = 0,
|
||||
AccentColour = Color4.DarkBlue,
|
||||
KiaiMode = kiai,
|
||||
Children = new[]
|
||||
{
|
||||
new RimHitSymbolPiece()
|
||||
}
|
||||
});
|
||||
|
||||
Add(new CirclePiece
|
||||
@ -74,7 +88,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
}
|
||||
});
|
||||
|
||||
Add(new DrumRollCircle(new CirclePiece()
|
||||
Add(new DrumRollCircle(new CirclePiece
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
@ -83,7 +97,7 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
Position = new Vector2(575, 100)
|
||||
});
|
||||
|
||||
Add(new DrumRollCircle(new StrongCirclePiece()
|
||||
Add(new DrumRollCircle(new StrongCirclePiece
|
||||
{
|
||||
KiaiMode = kiai
|
||||
})
|
||||
@ -107,72 +121,8 @@ namespace osu.Desktop.VisualTests.Tests
|
||||
}
|
||||
}
|
||||
|
||||
private class CentreHitCircle : BaseCircle
|
||||
{
|
||||
public CentreHitCircle(CirclePiece piece)
|
||||
: base(piece)
|
||||
{
|
||||
Piece.Add(new CircularContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(SYMBOL_INNER_SIZE),
|
||||
Masking = true,
|
||||
Children = new[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Piece.AccentColour = colours.PinkDarker;
|
||||
}
|
||||
}
|
||||
|
||||
private class RimHitCircle : BaseCircle
|
||||
{
|
||||
public RimHitCircle(CirclePiece piece)
|
||||
: base(piece)
|
||||
{
|
||||
Piece.Add(new CircularContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Size = new Vector2(SYMBOL_SIZE),
|
||||
BorderThickness = SYMBOL_BORDER,
|
||||
BorderColour = Color4.White,
|
||||
Masking = true,
|
||||
Children = new[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
Piece.AccentColour = colours.BlueDarker;
|
||||
}
|
||||
}
|
||||
|
||||
private abstract class BaseCircle : Container
|
||||
{
|
||||
protected const float SYMBOL_SIZE = TaikoHitObject.CIRCLE_RADIUS * 2f * 0.45f;
|
||||
protected const float SYMBOL_BORDER = 8;
|
||||
protected const float SYMBOL_INNER_SIZE = SYMBOL_SIZE - 2 * SYMBOL_BORDER;
|
||||
|
||||
protected readonly CirclePiece Piece;
|
||||
|
||||
protected BaseCircle(CirclePiece piece)
|
||||
|
Reference in New Issue
Block a user