mirror of
https://github.com/osukey/osukey.git
synced 2025-06-09 13:28:03 +09:00
Remove redundant parameter in DrumSegment
constructor
This commit is contained in:
parent
ffbaf453f8
commit
bc02fb0e32
@ -71,27 +71,27 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
leftRim = new DrumSegment(TaikoAction.LeftRim)
|
leftRim = new DrumSegment
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
X = -2,
|
X = -2,
|
||||||
},
|
},
|
||||||
rightRim = new DrumSegment(TaikoAction.RightCentre)
|
rightRim = new DrumSegment
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
X = 2,
|
X = 2,
|
||||||
Rotation = 90,
|
Rotation = 90,
|
||||||
},
|
},
|
||||||
leftCentre = new DrumSegment(TaikoAction.LeftCentre)
|
leftCentre = new DrumSegment
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
X = -2,
|
X = -2,
|
||||||
Scale = new Vector2(centre_region),
|
Scale = new Vector2(centre_region),
|
||||||
},
|
},
|
||||||
rightCentre = new DrumSegment(TaikoAction.RightRim)
|
rightCentre = new DrumSegment
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.BottomRight,
|
Origin = Anchor.BottomRight,
|
||||||
@ -192,9 +192,6 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
trackedActions.Remove(source);
|
trackedActions.Remove(source);
|
||||||
}
|
}
|
||||||
|
|
||||||
private bool validMouse(MouseButtonEvent e) =>
|
|
||||||
leftRim.Contains(e.ScreenSpaceMouseDownPosition) || rightRim.Contains(e.ScreenSpaceMouseDownPosition);
|
|
||||||
|
|
||||||
private TaikoAction getTaikoActionFromPosition(Vector2 inputPosition)
|
private TaikoAction getTaikoActionFromPosition(Vector2 inputPosition)
|
||||||
{
|
{
|
||||||
bool centreHit = leftCentre.Contains(inputPosition) || rightCentre.Contains(inputPosition);
|
bool centreHit = leftCentre.Contains(inputPosition) || rightCentre.Contains(inputPosition);
|
||||||
@ -242,10 +239,8 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
|
|
||||||
public override bool Contains(Vector2 screenSpacePos) => circle.Contains(screenSpacePos);
|
public override bool Contains(Vector2 screenSpacePos) => circle.Contains(screenSpacePos);
|
||||||
|
|
||||||
public DrumSegment(TaikoAction action)
|
public DrumSegment()
|
||||||
{
|
{
|
||||||
Action = action;
|
|
||||||
|
|
||||||
RelativeSizeAxes = Axes.Both;
|
RelativeSizeAxes = Axes.Both;
|
||||||
|
|
||||||
FillMode = FillMode.Fit;
|
FillMode = FillMode.Fit;
|
||||||
@ -305,7 +300,7 @@ namespace osu.Game.Rulesets.Taiko.UI
|
|||||||
if (!IsLoaded)
|
if (!IsLoaded)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
var colour = getColourFromTaikoAction(action);
|
var colour = getColourFromTaikoAction(Action);
|
||||||
|
|
||||||
circle.Colour = colour.Multiply(1.4f).Darken(2.8f);
|
circle.Colour = colour.Multiply(1.4f).Darken(2.8f);
|
||||||
overlay.Colour = colour;
|
overlay.Colour = colour;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user