mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 22:22:56 +08:00
Merge pull request #520 from smoogipooo/use_equilateral_triangles
Update framework + use EquilateralTriangle in Triangles.
This commit is contained in:
commit
1d9da8facd
@ -99,15 +99,14 @@ namespace osu.Game.Graphics.Backgrounds
|
|||||||
|
|
||||||
const float size = 100;
|
const float size = 100;
|
||||||
|
|
||||||
return new Triangle
|
return new EquilateralTriangle
|
||||||
{
|
{
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
RelativePositionAxes = Axes.Both,
|
RelativePositionAxes = Axes.Both,
|
||||||
|
Size = new Vector2(size),
|
||||||
Scale = new Vector2(scale),
|
Scale = new Vector2(scale),
|
||||||
EdgeSmoothness = new Vector2(1),
|
EdgeSmoothness = new Vector2(1),
|
||||||
Colour = GetTriangleShade(),
|
Colour = GetTriangleShade(),
|
||||||
// Scaling height by 0.866 results in equiangular triangles (== 60° and equal side length)
|
|
||||||
Size = new Vector2(size, 0.866f * size),
|
|
||||||
Depth = scale,
|
Depth = scale,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user