mirror of
https://github.com/ppy/osu.git
synced 2025-03-28 10:17:19 +08:00
Don't initialise children in load().
This commit is contained in:
parent
353b9c0789
commit
4e2e7ec8ba
@ -306,18 +306,22 @@ namespace osu.Game.Modes.Osu.Objects.Drawables
|
|||||||
|
|
||||||
private class Triangles : Container
|
private class Triangles : Container
|
||||||
{
|
{
|
||||||
private Texture tex;
|
private Texture triangle;
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(TextureStore textures)
|
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++)
|
for (int i = 0; i < 10; i++)
|
||||||
{
|
{
|
||||||
Add(new Sprite
|
Add(new Sprite
|
||||||
{
|
{
|
||||||
Texture = tex,
|
Texture = triangle,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.Centre,
|
||||||
RelativePositionAxes = Axes.Both,
|
RelativePositionAxes = Axes.Both,
|
||||||
Position = new Vector2(RNG.NextSingle(), RNG.NextSingle()),
|
Position = new Vector2(RNG.NextSingle(), RNG.NextSingle()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user