1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Don't initialise children in load().

This commit is contained in:
Dean Herbert 2016-11-16 16:59:34 +09:00
parent 353b9c0789
commit 4e2e7ec8ba

View File

@ -306,18 +306,22 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
private class Triangles : Container
{
private Texture tex;
private Texture triangle;
[BackgroundDependencyLoader]
private void load(TextureStore textures)
{
tex = textures.Get(@"Play/osu/triangle@2x");
triangle = textures.Get(@"Play/osu/triangle@2x");
}
protected override void LoadComplete()
{
base.LoadComplete();
for (int i = 0; i < 10; i++)
{
Add(new Sprite
{
Texture = tex,
Texture = triangle,
Origin = Anchor.Centre,
RelativePositionAxes = Axes.Both,
Position = new Vector2(RNG.NextSingle(), RNG.NextSingle()),