Use children for initialisation.

This commit is contained in:
Dean Herbert 2016-09-21 13:25:23 +09:00
parent 3a5f37444c
commit 33e46facec
1 changed files with 30 additions and 30 deletions

View File

@ -41,37 +41,37 @@ public override void Load()
HitObjects = objects
};
Add(new OsuHitRenderer()
Children = new Drawable[]
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.TopLeft,
Origin = Anchor.TopLeft
});
Add(new TaikoHitRenderer()
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight
});
Add(new CatchHitRenderer()
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft
});
Add(new ManiaHitRenderer()
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight
});
new OsuHitRenderer
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.TopLeft,
Origin = Anchor.TopLeft
},
new TaikoHitRenderer
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight
},
new CatchHitRenderer
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.BottomLeft,
Origin = Anchor.BottomLeft
},
new ManiaHitRenderer
{
Objects = beatmap.HitObjects,
Scale = new Vector2(0.5f),
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight
}
};
}
}
}