osu/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/DefaultCirclePiece.cs

37 lines
1.1 KiB
C#
Raw Normal View History

2018-04-13 09:19:50 +00:00
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
2018-08-27 08:26:44 +00:00
using System.Threading.Tasks;
2018-04-13 09:19:50 +00:00
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
{
public class DefaultCirclePiece : Container
{
[BackgroundDependencyLoader]
2018-08-27 08:26:44 +00:00
private async Task load(TextureStore textures)
2018-04-13 09:19:50 +00:00
{
RelativeSizeAxes = Axes.Both;
Children = new Drawable[]
{
new Sprite
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
2018-08-27 08:26:44 +00:00
Texture = await textures.GetAsync(@"Play/osu/disc"),
2018-04-13 09:19:50 +00:00
},
new TrianglesPiece
{
RelativeSizeAxes = Axes.Both,
Blending = BlendingMode.Additive,
Alpha = 0.5f,
}
};
}
}
}